public void ApplyTo(IDrawingGraphics gr) { gr.FontName(this.FontFamily); gr.FontSize(this.FontSize); gr.Color(this.Foreground); gr.Bold(this.Bold); }
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); }