70 lines
1008 B
C#
70 lines
1008 B
C#
using System;
|
|
using CPF.Drawing;
|
|
|
|
namespace CPF.ReoGrid.Drawing
|
|
{
|
|
public class CPFPen : IDisposable
|
|
{
|
|
public CPFPen(Color color, float w)
|
|
{
|
|
this.Stroke = new Stroke(w);
|
|
this.Brush = new SolidColorBrush(color);
|
|
}
|
|
|
|
public DashStyles DashStyle
|
|
{
|
|
get
|
|
{
|
|
return this.Stroke.DashStyle;
|
|
}
|
|
set
|
|
{
|
|
Stroke stroke = this.Stroke;
|
|
stroke.DashStyle = value;
|
|
this.Stroke = stroke;
|
|
}
|
|
}
|
|
|
|
public CapStyles LineCap
|
|
{
|
|
get
|
|
{
|
|
return this.Stroke.StrokeCap;
|
|
}
|
|
set
|
|
{
|
|
Stroke stroke = this.Stroke;
|
|
stroke.StrokeCap = value;
|
|
this.Stroke = stroke;
|
|
}
|
|
}
|
|
|
|
public float Width
|
|
{
|
|
get
|
|
{
|
|
return this.Stroke.Width;
|
|
}
|
|
set
|
|
{
|
|
Stroke stroke = this.Stroke;
|
|
stroke.Width = value;
|
|
this.Stroke = stroke;
|
|
}
|
|
}
|
|
|
|
public Stroke Stroke { get; set; }
|
|
|
|
public Brush Brush { get; set; }
|
|
|
|
public void Dispose()
|
|
{
|
|
bool flag = this.Brush != null;
|
|
if (flag)
|
|
{
|
|
((IDisposable)this.Brush).Dispose();
|
|
}
|
|
}
|
|
}
|
|
}
|