Ejemplo n.º 1
0
 public void ApplyTo(IDrawingGraphics gr)
 {
     gr.FontName(this.FontFamily);
     gr.FontSize(this.FontSize);
     gr.Color(this.Foreground);
     gr.Bold(this.Bold);
 }
Ejemplo n.º 2
0
        public override void Draw(IDrawingGraphics drawingGraphics)
        {
            drawingGraphics.Style(this.Style);
            if(AdaptFontSize)
            {
                if(!FontSizeAdapted)
                {
                    Size targetSize;
                    NewFontSize = drawingGraphics.CalculateFontSizeForArea(this.title, new Size(this.Width, Body.Location.Y), out targetSize);
                    FontSizeAdapted = true;
                }
            } else {
                NewFontSize = Style.FontSize;
            }
            drawingGraphics
                .FontSize(NewFontSize)
                .DrawText(this.title)
                .MoveTo(0, 0);

            base.Draw(drawingGraphics);
        }
Ejemplo n.º 3
0
 public void ApplyTo(IDrawingGraphics gr)
 {
     gr.FontName(this.FontFamily);
     gr.FontSize(this.FontSize);
     gr.Color(this.Foreground);
     gr.Bold(this.Bold);
 }