CPF/CPF.ReoGrid/Views/OutlineLeftTopSpace.cs

24 lines
842 B
C#
Raw Normal View History

2024-06-24 10:15:59 +08:00
using System;
using CPF.ReoGrid.Drawing;
using CPF.ReoGrid.Rendering;
namespace CPF.ReoGrid.Views
{
internal class OutlineLeftTopSpace : View
{
public OutlineLeftTopSpace(IViewportController vc) : base(vc)
{
}
public override void Draw(CellDrawingContext dc)
{
Worksheet worksheet = base.ViewportController.Worksheet;
ControlAppearanceStyle controlStyle = worksheet.workbook.controlAdapter.ControlStyle;
CPFPen pen = dc.Renderer.GetPen(controlStyle[ControlAppearanceColors.OutlinePanelBorder]);
dc.Graphics.FillRectangle(this.bounds, controlStyle[ControlAppearanceColors.OutlinePanelBackground]);
dc.Graphics.DrawLine(pen, this.bounds.Right, this.bounds.Y, this.bounds.Right, this.bounds.Bottom);
dc.Graphics.DrawLine(pen, this.bounds.X, this.bounds.Bottom, this.bounds.Right, this.bounds.Bottom);
}
}
}