25 lines
586 B
C#
25 lines
586 B
C#
![]() |
using System;
|
|||
|
using CPF.ReoGrid.Drawing;
|
|||
|
using CPF.ReoGrid.Graphics;
|
|||
|
using CPF.ReoGrid.Rendering;
|
|||
|
|
|||
|
namespace CPF.ReoGrid.Chart
|
|||
|
{
|
|||
|
internal class ChartTitle : DrawingObject
|
|||
|
{
|
|||
|
public IChart Chart { get; set; }
|
|||
|
|
|||
|
public ChartTitle(IChart chart)
|
|||
|
{
|
|||
|
this.Chart = chart;
|
|||
|
this.FontSize += 5f;
|
|||
|
}
|
|||
|
|
|||
|
protected override void OnPaint(RDrawingContext dc)
|
|||
|
{
|
|||
|
IGraphics graphics = dc.Graphics;
|
|||
|
graphics.DrawText(this.Chart.Title, this.FontName, this.FontSize, StaticResources.SystemColor_WindowText, this.ClientBounds, ReoGridHorAlign.Center, ReoGridVerAlign.Middle);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|