C# Class Revit.SDK.Samples.NewOpenings.CS.RectTool

Tool used to draw rectangle
Inheritance: ITool
Datei anzeigen Open project: AMEE/revit

Public Methods

Method Description
Draw ( Graphics graphic ) : void

Draw rectangles

OnMouseDown ( Graphics graphic, MouseEventArgs e ) : void

Mouse down event handler

OnMouseMove ( Graphics graphic, MouseEventArgs e ) : void

Mouse move event handler

OnMouseUp ( Graphics graphic, MouseEventArgs e ) : void

Mouse up event handler

RectTool ( ) : System

Default constructor

Private Methods

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

Draw rectangle use the given two opposite point p1 and p2

Method Details

Draw() public method

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

OnMouseDown() public method

Mouse down event handler
public OnMouseDown ( Graphics graphic, MouseEventArgs e ) : void
graphic System.Drawing.Graphics Graphics object,used to draw geometry
e MouseEventArgs Mouse event argument
return void

OnMouseMove() public method

Mouse move event handler
public OnMouseMove ( Graphics graphic, MouseEventArgs e ) : void
graphic System.Drawing.Graphics Graphics object,used to draw geometry
e MouseEventArgs Mouse event argument
return void

OnMouseUp() public method

Mouse up event handler
public OnMouseUp ( Graphics graphic, MouseEventArgs e ) : void
graphic System.Drawing.Graphics Graphics object,used to draw geometry
e MouseEventArgs Mouse event argument
return void

RectTool() public method

Default constructor
public RectTool ( ) : System
return System