Go to the documentation of this file.
24 #ifndef vtkColorLegend_h
25 #define vtkColorLegend_h
27 #include "vtkChartsCoreModule.h"
120 vtkGetMacro(Orientation,
int);
137 vtkGetMacro(DrawBorder,
bool);
164 void *clientdata,
void* calldata);
virtual vtkScalarsToColors * GetTransferFunction()
data structure to represent mouse events.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
virtual void ComputeTexture()
Need to be reimplemented by subclasses, ComputeTexture() is called at paint time if the texture is no...
virtual void SetPoint(float x, float y)
Set the point this legend is anchored to.
virtual vtkRectf GetPosition()
Returns the origin, width, and height of the scalar bar drawn by this legend.
abstract base class for most VTK objects
Class for drawing 2D primitives to a graphical context.
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...
vtkSmartPointer< vtkCallbackCommand > Callback
vtkScalarsToColors * TransferFunction
virtual vtkStdString GetTitle()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkImageData > ImageData
virtual void SetTitle(const vtkStdString &title)
Get/set the title text of the legend.
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
virtual bool Paint(vtkContext2D *painter)
Paint the texture into a rectangle defined by the bounds.
static void OnScalarsToColorsModified(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
topologically and geometrically regular array of data
a simple class to control print indentation
Superclass for mapping scalar values to colors.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
void UpdateAxisPosition()
Moves the axis whenever the position of this legend changes.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
virtual ~vtkColorLegend()
Legend item to display vtkScalarsToColors.
takes care of drawing 2D axes
supports function callbacks
virtual void ScalarsToColorsModified(vtkObject *caller, unsigned long eid, void *calldata)
Called whenever the ScalarsToColors function(s) is modified.
static vtkColorLegend * New()
Wrapper around std::string to keep symbols short.
vtkSmartPointer< vtkAxis > Axis
virtual void SetTransferFunction(vtkScalarsToColors *transfer)
Set/Get the transfer function that is used to draw the scalar bar within this legend.
virtual void SetPosition(const vtkRectf &pos)
Set the origin, width, and height of the scalar bar drawn by this legend.
virtual void SetTextureSize(float w, float h)
Set the size of the scalar bar drawn by this legend.
vtkRectf GetBoundingRect(vtkContext2D *painter)
Request the space the legend requires to be drawn.
virtual void SetOrientation(int orientation)
Set/get the orientation of the legend.