26 #ifndef vtkContextTransform_h
27 #define vtkContextTransform_h
30 #include "vtkRenderingContext2DModule.h"
34 VTK_ABI_NAMESPACE_BEGIN
75 virtual void Scale(
float dx,
float dy);
102 vtkSetMacro(PanMouseButton,
int);
103 vtkGetMacro(PanMouseButton,
int);
111 vtkSetMacro(PanModifier,
int);
112 vtkGetMacro(PanModifier,
int);
120 vtkSetMacro(SecondaryPanMouseButton,
int);
121 vtkGetMacro(SecondaryPanMouseButton,
int);
129 vtkSetMacro(SecondaryPanModifier,
int);
130 vtkGetMacro(SecondaryPanModifier,
int);
138 vtkSetMacro(ZoomMouseButton,
int);
139 vtkGetMacro(ZoomMouseButton,
int);
147 vtkSetMacro(ZoomModifier,
int);
148 vtkGetMacro(ZoomModifier,
int);
156 vtkSetMacro(SecondaryZoomMouseButton,
int);
157 vtkGetMacro(SecondaryZoomMouseButton,
int);
165 vtkSetMacro(SecondaryZoomModifier,
int);
166 vtkGetMacro(SecondaryZoomModifier,
int);
173 vtkSetMacro(ZoomOnMouseWheel,
bool);
174 vtkGetMacro(ZoomOnMouseWheel,
bool);
175 vtkBooleanMacro(ZoomOnMouseWheel,
bool);
182 vtkSetMacro(PanYOnMouseWheel,
bool);
183 vtkGetMacro(PanYOnMouseWheel,
bool);
184 vtkBooleanMacro(PanYOnMouseWheel,
bool);
232 VTK_ABI_NAMESPACE_END
base class for items that are part of a vtkContextScene.
Class for drawing 2D primitives to a graphical context.
data structure to represent mouse events.
all children of this item are transformed by the vtkTransform2D of this item.
bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta) override
Mouse wheel event.
bool Paint(vtkContext2D *painter) override
Paint event for the item, called whenever the item needs to be drawn.
virtual void Identity()
Reset the transform to the identity transformation.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkTransform2D * GetTransform()
Access the vtkTransform2D that controls object transformation.
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
int SecondaryZoomMouseButton
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
Mouse move event.
bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse) override
Mouse press event.
vtkVector2f MapToParent(const vtkVector2f &point) override
Transforms a point to the parent coordinate system.
static vtkContextTransform * New()
Creates a vtkContextTransform object.
bool Hit(const vtkContextMouseEvent &mouse) override
Returns true if the transform is interactive, false otherwise.
~vtkContextTransform() override
void Update() override
Perform any updates to the item that may be necessary before rendering.
vtkVector2f MapFromParent(const vtkVector2f &point) override
Transforms a point from the parent coordinate system.
virtual void Scale(float dx, float dy)
Scale the item by the specified amounts dx and dy in the x and y directions.
vtkSmartPointer< vtkTransform2D > Transform
virtual void Rotate(float angle)
Rotate the item by the specified angle.
int SecondaryZoomModifier
a simple class to control print indentation