Rectangular.cs
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace zhouchen.chart.chart
{
public class Rectangular : PlanarChart
{
public Rectangular() : base()
{
_chartType = ChartType.Chart_Rectangular;
}
public Rectangular(Point ptStart, Point ptEnd) : base(ptStart, ptEnd)
{
_chartType = ChartType.Chart_Rectangular;
}
public override void DrawChart(Graphics graph, Matrix matrix)
{
Point[] pts = (Point[])ptCorrs.Clone();
matrix.TransformPoints(pts);
Pen pen = new Pen(this._ColorLine, this._nLineWidth);
Point[] ptTemp = new Point[]
{
pts[(int)CORR_PT.PT_LT],
pts[(int)CORR_PT.PT_RT],
pts[(int)CORR_PT.PT_RB],
pts[(int)CORR_PT.PT_LB]
};
if(_IsFillColor)
{
graph.FillPolygon(new SolidBrush(this._FillColor), ptTemp);
}
graph.DrawPolygon(pen, ptTemp);
base.DrawChart(graph, matrix);
}
}
}