C# Class HasK.Controls.Graph.ChartRectObject

Base class for all visible rect-like objects
Inheritance: ChartVisibleObject
Mostra file Open project: xHasKx/CSharp.Controls.Graph.Chart

Public Methods

Method Description
ChartRectObject ( Chart chart ) : System

Create base class for all rect-like objects

GetRealRect ( Graphics g, double view_scale ) : DRect

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

GetScreenRect ( Graphics g, double view_scale ) : RectangleF

Gets the rectangle of object in screen coordinates

Protected Methods

Method Description
DrawStringCenter ( Graphics g, string text ) : void

Draw text on the center of rect object

Method Details

ChartRectObject() public method

Create base class for all rect-like objects
public ChartRectObject ( Chart chart ) : System
chart Chart
return System

DrawStringCenter() protected method

Draw text on the center of rect object
protected DrawStringCenter ( Graphics g, string text ) : void
g System.Drawing.Graphics Graphics object to draw string
text string Text to draw on object
return void

GetRealRect() public abstract method

Chart will calls this method to determine visible bounds of object with given view scale and graphics
public abstract 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

GetScreenRect() public method

Gets the rectangle of object in screen coordinates
public GetScreenRect ( Graphics g, double view_scale ) : RectangleF
g System.Drawing.Graphics Current Graphics object, use it for MeasureStringWidth or something else
view_scale double Current view scale of chart
return System.Drawing.RectangleF