C# Class HasK.Controls.Graph.ChartPolygon

On-chart polygon
Inheritance: ChartRectObject, IChartMouseMovableObject
Show file Open project: xHasKx/CSharp.Controls.Graph.Chart Class Usage Examples

Protected Properties

Property Type Description
_center DPoint
_points DPoint[]

Public Methods

Method Description
ChartPolygon ( Chart chart, DPoint points ) : System

Create the on-chart polygon

ChartPolygon ( Chart chart, DPoint points, Color color ) : System

Create the on-chart polygon

Draw ( Graphics g ) : void

Chart will calls this method to draw object

GetRealRect ( Graphics g, double view_scale ) : DRect

Chart will calls this method to determine visible bounds of object with given view scale and graphics

MoveTo ( DPoint point ) : void

This method will be called by chart when mouse was moved on chart

Method Details

ChartPolygon() public method

Create the on-chart polygon
public ChartPolygon ( Chart chart, DPoint points ) : System
chart Chart Chart for polygon
points DPoint The points of polygon
return System

ChartPolygon() public method

Create the on-chart polygon
public ChartPolygon ( Chart chart, DPoint points, Color color ) : System
chart Chart Chart for polygon
points DPoint The points of polygon
color Color The color of polygon
return System

Draw() public method

Chart will calls this method to draw object
public Draw ( Graphics g ) : void
g System.Drawing.Graphics Graphics, which should be used for drawing
return void

GetRealRect() public method

Chart will calls this method to determine visible bounds of object with given view scale and graphics
public GetRealRect ( Graphics g, double view_scale ) : DRect
g System.Drawing.Graphics Current Graphics object, use it for MeasureStringWidth or something else
view_scale double Current view scale of chart
return DRect

MoveTo() public method

This method will be called by chart when mouse was moved on chart
public MoveTo ( DPoint point ) : void
point DPoint Stores the point of mouse cursor tied to grid
return void

Property Details

_center protected property

Stores the relative center of all points
protected DPoint _center
return DPoint

_points protected property

Stores array of polygon's points
protected DPoint[] _points
return DPoint[]