C# Class Revit.SDK.Samples.ShaftHolePuncher.CS.ITool

Abstract class used as a base class of all drawing tool class
Show file Open project: AMEE/revit Class Usage Examples

Protected Properties

Property Type Description
m_backGroundPen System.Drawing.Pen
m_finished bool
m_foreGroundPen System.Drawing.Pen
m_points List
m_preDownPoint Point
m_preMovePoint Point

Public Methods

Method Description
Clear ( ) : void

clear all the points in the tool

Draw ( Graphics graphic ) : void

draw the stored lines

GetDistance ( Point p1, Point p2 ) : double

calculate the distance between two points

ITool ( ) : System

default constructor

OnMouseDown ( System e ) : void

record the location point where mouse clicked

OnMouseMove ( System graphic, System e ) : void

draw a line from end point to the location where mouse moved

Method Details

Clear() public method

clear all the points in the tool
public Clear ( ) : void
return void

Draw() public method

draw the stored lines
public Draw ( Graphics graphic ) : void
graphic System.Drawing.Graphics Graphics object, used to draw geometry
return void

GetDistance() public method

calculate the distance between two points
public GetDistance ( Point p1, Point p2 ) : double
p1 Point first point
p2 Point second point
return double

ITool() public method

default constructor
public ITool ( ) : System
return System

OnMouseDown() public method

record the location point where mouse clicked
public OnMouseDown ( System e ) : void
e System mouse event args
return void

OnMouseMove() public method

draw a line from end point to the location where mouse moved
public OnMouseMove ( System graphic, System e ) : void
graphic System Graphics object,used to draw geometry
e System mouse event args
return void

Property Details

m_backGroundPen protected property

protected Pen,System.Drawing m_backGroundPen
return System.Drawing.Pen

m_finished protected property

protected bool m_finished
return bool

m_foreGroundPen protected property

protected Pen,System.Drawing m_foreGroundPen
return System.Drawing.Pen

m_points protected property

protected List m_points
return List

m_preDownPoint protected property

protected Point m_preDownPoint
return Point

m_preMovePoint protected property

protected Point m_preMovePoint
return Point