Пример #1
0
 public void ApplyTo(IDrawingGraphics gr)
 {
     gr.FontName(this.FontFamily);
     gr.FontSize(this.FontSize);
     gr.Color(this.Foreground);
     gr.Bold(this.Bold);
 }
Пример #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);
        }
Пример #3
0
 public void ApplyTo(IDrawingGraphics gr)
 {
     gr.FontName(this.FontFamily);
     gr.FontSize(this.FontSize);
     gr.Color(this.Foreground);
     gr.Bold(this.Bold);
 }