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

tool used to draw line
Inheritance: ITool
Exibir arquivo Open project: AMEE/revit

Public Methods

Method Description
Draw ( Graphics graphic ) : void

draw a rectangle

OnMouseDown ( System e ) : void

record the location point where mouse clicked

OnMouseMove ( System graphic, System e ) : void

draw a line from end point of tool to the location where mouse move

Private Methods

Method Description
DrawRect ( Graphics graphic, Pen pen, Point p1, Point p2 ) : void

draw rectangle use the given two points p1 and p2

Method Details

Draw() public method

draw a rectangle
public Draw ( Graphics graphic ) : void
graphic System.Drawing.Graphics Graphics object, use to draw geometry
return void

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 of tool to the location where mouse move
public OnMouseMove ( System graphic, System e ) : void
graphic System graphic object,used to draw geometry
e System mouse event args
return void