public void Draw(IGraphicsContext <TFont, TGlyph> context)
 {
     context.SaveState();
     context.Translate(new PointF(Position.X, Position.Y - ShiftDown));
     context.SetTextPosition(new PointF());
     context.DrawGlyphsAtPoints(_glyphs, Font, _glyphPositions, TextColor);
     context.RestoreState();
 }
Beispiel #2
0
        public void Draw(IGraphicsContext <TFont, TGlyph> context)
        {
            context.SaveState();
            PointF delta = new PointF(Position.X, Position.Y - ShiftDown);

            context.Translate(delta);
            context.SetTextPosition(new PointF());
            context.DrawGlyphsAtPoints(_glyphs.AsForEach(), _mathFont, _glyphPositions.AsForEach(), TextColor);
            context.RestoreState();
        }
Beispiel #3
0
 public void Draw(IGraphicsContext <TFont, TGlyph> context)
 {
     context.SaveState();
     TGlyph[] glyphArray = { Glyph };
     PointF[] positions  = { new PointF() };
     context.Translate(new PointF(Position.X, Position.Y - ShiftDown));
     context.SetTextPosition(new PointF());
     context.DrawGlyphsAtPoints(glyphArray, Font, positions, TextColor);
     context.RestoreState();
 }
Beispiel #4
0
 public void Draw(IGraphicsContext <TFont, TGlyph> context)
 {
     this.DrawBackground(context);
     context.SaveState();
     using var glyphs    = new Structures.RentedArray <TGlyph>(Glyph);
     using var positions = new Structures.RentedArray <PointF>(new PointF());
     context.Translate(new PointF(Position.X, Position.Y - ShiftDown));
     context.SetTextPosition(new PointF());
     context.DrawGlyphsAtPoints(glyphs.Result, Font, positions.Result, TextColor);
     context.RestoreState();
 }
Beispiel #5
0
        public void Draw(IGraphicsContext <TFont, TGlyph> context)
        {
            context.SaveState();
            var glyphs    = new RentedArray <TGlyph>(Glyph);
            var positions = new RentedArray <PointF>(new PointF());

            context.Translate(new PointF(Position.X, Position.Y - ShiftDown));
            context.SetTextPosition(new PointF());
            context.DrawGlyphsAtPoints(glyphs.Result, Font, positions.Result, TextColor);
            context.RestoreState();
            glyphs.Return();
            positions.Return();
        }