Ipelib
|
A tool for transforming the selected objects on the canvas. More...
#include <ipetool.h>
Inherits ipe::Tool.
A tool for transforming the selected objects on the canvas.
Supports moving, rotating, scaling, and stretching.
TransformTool::TransformTool | ( | CanvasBase * | canvas, |
Page * | page, | ||
int | view, | ||
TType | type, | ||
bool | withShift | ||
) |
Constructor starts transformation.
After constructing a TransformTool, you must call isValid() to ensure that the transformation can be performed.
A transformation can fail because the selection contains pinned objects, or because the initial mouse position is identical to the transformation origin.
bool TransformTool::isValid | ( | ) | const |
Check that the transformation can be performed.
void TransformTool::mouseButton | ( | int | button, |
bool | press | ||
) | [virtual] |
Called when a mouse button is pressed or released on the canvas.
button is 1, 2, or 3, with Shift/Ctrl/Alt/Meta modifiers added in (as defined in CanvasBase::TModifiers. press is true for button-down, and false for button-up.
Reimplemented from ipe::Tool.
void TransformTool::mouseMove | ( | ) | [virtual] |
Called when the mouse is moved on the canvas.
Reimplemented from ipe::Tool.
void TransformTool::report | ( | ) | [virtual] |
Report the final transformation chosen.
The implementation in TransformTool does nothing. Derived classes should reimplement report().
void TransformTool::compute | ( | const Vector & | v | ) | [protected] |
Page* ipe::TransformTool::iPage [protected] |
int ipe::TransformTool::iView [protected] |
TType ipe::TransformTool::iType [protected] |
bool ipe::TransformTool::iWithShift [protected] |
bool ipe::TransformTool::iOnlyHorizontal [protected] |
bool ipe::TransformTool::iOnlyVertical [protected] |
Vector ipe::TransformTool::iMouseDown [protected] |
Matrix ipe::TransformTool::iTransform [protected] |
Vector ipe::TransformTool::iOrigin [protected] |
bool ipe::TransformTool::iValid [protected] |