MGUI::TOOL_RECTANGLE Class Reference
Rectangle tool class.
More...
#include <mgui/toolrectangle.h>
List of all members.
Detailed Description
Rectangle tool class.
Member Enumeration Documentation
- Enumerator:
| DIRECTION_Forward |
|
| DIRECTION_Backward |
|
| DIRECTION_Left |
|
| DIRECTION_Right |
|
- Enumerator:
| STARTMODE_Default |
Upright rectangle, start at one corner, drag opposite corner.
|
| STARTMODE_CenterlineWidth |
Press-drag-release to define centerline, click again to define width.
|
Constructor & Destructor Documentation
| MGUI::TOOL_RECTANGLE::TOOL_RECTANGLE |
( |
TOOLCANVAS * |
canvas |
) |
[explicit] |
| virtual MGUI::TOOL_RECTANGLE::~TOOL_RECTANGLE |
( |
|
) |
[virtual] |
Member Function Documentation
| double MGUI::TOOL_RECTANGLE::GetAngle |
( |
|
) |
const [inline] |
Get rotation angle.
- Returns:
- Rotation angle in RADIANS.
| DPOINT2D MGUI::TOOL_RECTANGLE::GetCenter |
( |
|
) |
const [inline] |
Get center of rectangle in tool coordinates.
| const DPOINT2D& MGUI::TOOL_RECTANGLE::GetCorner |
( |
int |
corner |
) |
const [inline] |
Get coordinates of specified corner.
- Parameters:
-
| corner | Corner number (0-3) |
| void MGUI::TOOL_RECTANGLE::GetCorners |
( |
DPOINT2D |
rcorners[4] |
) |
const [inline] |
Copy corner coordinates into specified array.
- Parameters:
-
| rcorners | Array to contain corner coordinates |
| const DPOINT2D* MGUI::TOOL_RECTANGLE::GetCorners |
( |
|
) |
const [inline] |
Get coordinates of all rectangle corners.
- Returns:
- Array of 4 corner coordinates.
| const DRECT2D& MGUI::TOOL_RECTANGLE::GetExtents |
( |
|
) |
const [inline] |
| const DPOINT2D& MGUI::TOOL_RECTANGLE::GetSize |
( |
|
) |
const [inline] |
Get current rectangle size.
- Returns:
- Size in tool coordinates before rotation.
| void MGUI::TOOL_RECTANGLE::MoveByStep |
( |
DIRECTION |
direction, |
|
|
double |
StepAmtOverride = 0 | |
|
) |
| | |
Move tool one "step" in specified direction.
- Parameters:
-
| direction | Direction |
| StepAmtOverride | Step amount override, 0 to use value set in tool |
| void MGUI::TOOL_RECTANGLE::SetAngleVisible |
( |
bool |
anglevisible = true, |
|
|
bool |
sideanglevisible = false, |
|
|
int |
pixels = 0 | |
|
) |
| | |
Set whether rotation angle indicator is visible.
The rotation angle is indicated by a line from the center to the boundary.
- Parameters:
-
| pixels | Number of pixels to extend handle outside of box |
| void MGUI::TOOL_RECTANGLE::SetAspect |
( |
double |
aspect |
) |
|
Set aspect ratio for rectangle.
Setting the aspect ratio to a value <= 0 removes the aspect constraint.
- Parameters:
-
| void MGUI::TOOL_RECTANGLE::SetCenterVisible |
( |
bool |
centervisible = true |
) |
|
Set whether center marker is visible.
| void MGUI::TOOL_RECTANGLE::SetCorners |
( |
const POLYLINE & |
corners |
) |
|
Set corners from POLYLINE.
Polyline must contain 4 vertices (5 if closed).
- Parameters:
-
| corners | Corners in tool coordinates. |
| void MGUI::TOOL_RECTANGLE::SetDftAngle |
( |
double |
dftangle |
) |
|
Set default angle for starting new rectangle.
- Parameters:
-
| dftangle | Default angle in degrees |
| void MGUI::TOOL_RECTANGLE::SetRectangle |
( |
const DRECT2D & |
rhs |
) |
|
Set position from rectangle.
- Parameters:
-
| rhs | Rectangle in tool coordinates to set |
| void MGUI::TOOL_RECTANGLE::SetSideMarkerLength |
( |
int |
lengthoutside |
) |
|
Set length of "side markers".
By default, no side markers are shown. This is useful if box indicates a target if it can become small and hard to see.
- Parameters:
-
| lengthoutside | Length of marker outside box in pixels |
| void MGUI::TOOL_RECTANGLE::SetStartMode |
( |
STARTMODE |
StartMode |
) |
[inline] |
Set mode for when user starts new box.
- Parameters:
-
| StartMode | Mode for when user starts new box |
| void MGUI::TOOL_RECTANGLE::SetStepByToolDimension |
( |
bool |
StepByToolDim = true, |
|
|
double |
StepAmt = 1.0 | |
|
) |
| | [inline] |
Set to step by tool dimension, supported in v_OnKey.
- Parameters:
-
| StepAmt | Size relative to width/height of profile tool (1.0 = 100%) |
The documentation for this class was generated from the following file: