Exemplo n.º 1
0
            public Glyph AppendGlyph(
                double x,
                double y,
                Rectangle sourceArea,
                char representation,
                Fonts.FontFaceRenderMap.Glyph data
                )
            {
                if (GlyphCount == _glyphs.Length)
                {
                    throw new System.InvalidOperationException($"Trying to append a glyph where is no glyph slot left.");
                }

                if (data == null)
                {
                    throw new System.ArgumentNullException(
                              nameof(data), $"Missing '{nameof(Fonts.FontFaceRenderMap.Glyph)}'"
                              );
                }

                Glyph glyph = new Glyph(x, y, sourceArea, representation, data);

                _glyphs[GlyphCount] = glyph;
                GlyphCount++;

                return(glyph);
            }
Exemplo n.º 2
0
 public Glyph(double x, double y, Rectangle sourceArea, char representation, Fonts.FontFaceRenderMap.Glyph data)
 {
     OriginalX      = X = x;
     OriginalY      = Y = y;
     SourceArea     = sourceArea;
     Representation = representation;
     Data           = data;
 }