C# Class Braincase.GanttChart.ControlViewport

An IViewport that is placed over a world coordinate system and provides methods to transform between world and view coordinates
Inheritance: IViewport
Show file Open project: JackWangCUMT/NetGanttControl Class Usage Examples

Public Properties

Property Type Description
Identity Matrix

Public Methods

Method Description
ControlViewport ( Control view ) : System

Construct a Viewport

DeviceToWorldCoord ( Point screencoord ) : PointF

Convert view coordinates to world coordinates

DeviceToWorldCoord ( PointF screencoord ) : PointF

Convert view coordinates to world coordinates

Resize ( ) : void

Resize the Viewport according to the view control and world dimensions, which ever larger and add scrollbars where approperiate

WorldToDeviceCoord ( PointF worldcoord ) : PointF

Convert world coordinates to view coordinates

Private Methods

Method Description
_RecalculateMatrix ( ) : void
_RecalculateRectangle ( ) : void

Method Details

ControlViewport() public method

Construct a Viewport
public ControlViewport ( Control view ) : System
view System.Windows.Forms.Control
return System

DeviceToWorldCoord() public method

Convert view coordinates to world coordinates
public DeviceToWorldCoord ( Point screencoord ) : PointF
screencoord Point
return System.Drawing.PointF

DeviceToWorldCoord() public method

Convert view coordinates to world coordinates
public DeviceToWorldCoord ( PointF screencoord ) : PointF
screencoord System.Drawing.PointF
return System.Drawing.PointF

Resize() public method

Resize the Viewport according to the view control and world dimensions, which ever larger and add scrollbars where approperiate
public Resize ( ) : void
return void

WorldToDeviceCoord() public method

Convert world coordinates to view coordinates
public WorldToDeviceCoord ( PointF worldcoord ) : PointF
worldcoord System.Drawing.PointF
return System.Drawing.PointF

Property Details

Identity public static property

Identity Matrix
public static Matrix Identity
return Matrix