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

Abstract class used as a base class of all drawing tool class
显示文件 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_oe property

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

m_finished protected_oe property

protected bool m_finished
return bool

m_foreGroundPen protected_oe property

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

m_points protected_oe property

protected List m_points
return List

m_preDownPoint protected_oe property

protected Point m_preDownPoint
return Point

m_preMovePoint protected_oe property

protected Point m_preMovePoint
return Point