43#ifndef vtkColorLegend_h
44#define vtkColorLegend_h
47#include "vtkChartsCoreModule.h"
140 vtkGetMacro(Orientation,
int);
156 vtkSetMacro(DrawBorder,
bool);
157 vtkGetMacro(DrawBorder,
bool);
158 vtkBooleanMacro(DrawBorder,
bool);
183 vtkObject* caller,
unsigned long eid,
void* clientdata,
void* calldata);
takes care of drawing 2D axes
supports function callbacks
Legend item to display vtkScalarsToColors.
vtkRectf GetBoundingRect(vtkContext2D *painter) override
Request the space the legend requires to be drawn.
virtual void SetOrientation(int orientation)
Set/get the orientation of the legend.
virtual void GetBounds(double bounds[4])
Bounds of the item, by default (0, 1, 0, 1) but it mainly depends on the range of the vtkScalarsToCol...
virtual vtkRectf GetPosition()
Returns the origin, width, and height of the scalar bar drawn by this legend.
void SetPoint(float x, float y) override
Set the point this legend is anchored to.
static vtkColorLegend * New()
void UpdateAxisPosition()
Moves the axis whenever the position of this legend changes.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkCallbackCommand > Callback
vtkSmartPointer< vtkImageData > ImageData
virtual void ComputeTexture()
Need to be reimplemented by subclasses, ComputeTexture() is called at paint time if the texture is no...
virtual vtkScalarsToColors * GetTransferFunction()
Set/Get the transfer function that is used to draw the scalar bar within this legend.
virtual void SetTextureSize(float w, float h)
Set the size of the scalar bar drawn by this legend.
static void OnScalarsToColorsModified(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
Called whenever the ScalarsToColors function(s) is modified.
virtual void SetPosition(const vtkRectf &pos)
Set the origin, width, and height of the scalar bar drawn by this legend.
virtual vtkStdString GetTitle()
Get/set the title text of the legend.
~vtkColorLegend() override
void Update() override
Perform any updates to the item that may be necessary before rendering.
vtkSmartPointer< vtkAxis > Axis
virtual void ScalarsToColorsModified(vtkObject *caller, unsigned long eid, void *calldata)
Called whenever the ScalarsToColors function(s) is modified.
vtkScalarsToColors * TransferFunction
virtual void SetTitle(const vtkStdString &title)
Get/set the title text of the legend.
bool Paint(vtkContext2D *painter) override
Paint the texture into a rectangle defined by the bounds.
virtual void SetTransferFunction(vtkScalarsToColors *transfer)
Set/Get the transfer function that is used to draw the scalar bar within this legend.
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
Mouse move event.
Class for drawing 2D primitives to a graphical context.
data structure to represent mouse events.
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...
topologically and geometrically regular array of data
a simple class to control print indentation
abstract base class for most VTK objects
Superclass for mapping scalar values to colors.
Wrapper around std::string to keep symbols short.