Go to the documentation of this file.
29 #ifndef vtkContextTransform_h
30 #define vtkContextTransform_h
32 #include "vtkRenderingContext2DModule.h"
77 virtual void Scale(
float dx,
float dy);
104 vtkSetMacro(PanMouseButton,
int);
105 vtkGetMacro(PanMouseButton,
int);
113 vtkSetMacro(PanModifier,
int);
114 vtkGetMacro(PanModifier,
int);
122 vtkSetMacro(SecondaryPanMouseButton,
int);
123 vtkGetMacro(SecondaryPanMouseButton,
int);
131 vtkSetMacro(SecondaryPanModifier,
int);
132 vtkGetMacro(SecondaryPanModifier,
int);
140 vtkSetMacro(ZoomMouseButton,
int);
141 vtkGetMacro(ZoomMouseButton,
int);
149 vtkSetMacro(ZoomModifier,
int);
150 vtkGetMacro(ZoomModifier,
int);
158 vtkSetMacro(SecondaryZoomMouseButton,
int);
159 vtkGetMacro(SecondaryZoomMouseButton,
int);
167 vtkSetMacro(SecondaryZoomModifier,
int);
168 vtkGetMacro(SecondaryZoomModifier,
int);
175 vtkSetMacro(ZoomOnMouseWheel,
bool);
176 vtkGetMacro(ZoomOnMouseWheel,
bool);
177 vtkBooleanMacro(ZoomOnMouseWheel,
bool);
184 vtkSetMacro(PanYOnMouseWheel,
bool);
185 vtkGetMacro(PanYOnMouseWheel,
bool);
186 vtkBooleanMacro(PanYOnMouseWheel,
bool);
235 #endif //vtkContextTransform_h
data structure to represent mouse events.
vtkSmartPointer< vtkTransform2D > Transform
virtual void Rotate(float angle)
Rotate the item by the specified angle.
bool Hit(const vtkContextMouseEvent &mouse) override
Returns true if the transform is interactive, false otherwise.
base class for items that are part of a vtkContextScene.
void Update() override
Perform any updates to the item that may be necessary before rendering.
vtkVector2f MapToParent(const vtkVector2f &point) override
Transforms a point to the parent coordinate system.
Class for drawing 2D primitives to a graphical context.
bool Paint(vtkContext2D *painter) override
Paint event for the item, called whenever the item needs to be drawn.
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
Mouse move event.
static vtkContextTransform * New()
Creates a vtkContextTransform object.
virtual void Translate(float dx, float dy)
Translate the item by the specified amounts dx and dy in the x and y directions.
int SecondaryPanMouseButton
a simple class to control print indentation
virtual vtkTransform2D * GetTransform()
Access the vtkTransform2D that controls object transformation.
virtual void Identity()
Reset the transform to the identity transformation.
~vtkContextTransform() override
all children of this item are transformed by the vtkTransform2D of this item.
vtkVector2f MapFromParent(const vtkVector2f &point) override
Transforms a point from the parent coordinate system.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse) override
Mouse press event.
int SecondaryZoomModifier
int SecondaryZoomMouseButton
bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta) override
Mouse wheel event.
virtual void Scale(float dx, float dy)
Scale the item by the specified amounts dx and dy in the x and y directions.