33 #ifndef vtkCompositeControlPointsItem_h
34 #define vtkCompositeControlPointsItem_h
36 #include "vtkChartsCoreModule.h"
68 ColorPointsFunction = 1,
69 OpacityPointsFunction = 2,
70 ColorAndOpacityPointsFunction = 3
86 vtkSetMacro(PointsFunction,
int);
87 vtkGetMacro(PointsFunction,
int);
113 vtkSetMacro(UseOpacityPointHandles,
bool);
114 vtkGetMacro(UseOpacityPointHandles,
bool);
153 void emitEvent(
unsigned long event,
void* params)
override;
158 void EditPoint(
float tX,
float tY)
override;
159 virtual void EditPointCurve(
vtkIdType idx);
161 void MergeTransferFunctions();
162 void SilentMergeTransferFunctions();
167 bool UseOpacityPointHandles =
false;
static vtkColorTransferControlPointsItem * New()
Creates a piecewise control points object.
bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse) override
Mouse and key events.
Defines a 1D piecewise function.
vtkTypeUInt32 vtkMTimeType
vtkMTimeType GetControlPointsMTime() override
Must be reimplemented by subclasses to calculate the points to draw.
void GetControlPoint(vtkIdType index, double *point) const override
Returns the x and y coordinates as well as the midpoint and sharpness of the control point correspond...
Class for drawing 2D primitives to a graphical context.
a vtkContextItem that draws handles around a point of a piecewise function
vtkIdType GetNumberOfPoints() const override
Return the number of points in the color transfer function.
bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse) override
Mouse and key events.
data structure to represent mouse events.
a simple class to control print indentation
Control points for vtkCompositeFunction.
vtkIdType AddPoint(double *newPos) override
Add a point to the function.
void EditPoint(float tX, float tY) override
vtkIdType RemovePoint(double *pos) override
Remove a point of the function.
Control points for vtkColorTransferFunction.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetColorTransferFunction(vtkColorTransferFunction *function)
Set the piecewise function to draw its points.
virtual vtkIdType RemovePoint(double *pos)=0
Remove a point of the function.
Defines a transfer function for mapping a property to an RGB color value.
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
Mouse and key events.
void SetControlPoint(vtkIdType index, double *point) override
Sets the x and y coordinates as well as the midpoint and sharpness of the control point corresponding...
void emitEvent(unsigned long event, void *params) override
void DrawPoint(vtkContext2D *painter, vtkIdType index) override
Internal function that paints a collection of points and optionally excludes some.