VTK
|
draw the chart legend More...
#include <vtkChartLegend.h>
draw the chart legend
The vtkChartLegend is drawn in screen coordinates. It is usually one of the last elements of a chart to be drawn. It renders the the mark/line for each plot, and the plot labels.
Definition at line 41 of file vtkChartLegend.h.
Reimplemented from vtkContextItem.
Reimplemented in vtkColorLegend.
Definition at line 44 of file vtkChartLegend.h.
anonymous enum |
Definition at line 60 of file vtkChartLegend.h.
vtkChartLegend::vtkChartLegend | ( | ) | [protected] |
vtkChartLegend::~vtkChartLegend | ( | ) | [protected] |
static int vtkChartLegend::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkContextItem.
Reimplemented in vtkColorLegend.
virtual int vtkChartLegend::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkContextItem.
Reimplemented in vtkColorLegend.
static vtkChartLegend* vtkChartLegend::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkContextItem.
Reimplemented in vtkColorLegend.
virtual vtkObjectBase* vtkChartLegend::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkContextItem.
Reimplemented in vtkColorLegend.
vtkChartLegend* vtkChartLegend::NewInstance | ( | ) | const |
Reimplemented from vtkContextItem.
Reimplemented in vtkColorLegend.
virtual void vtkChartLegend::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkContextItem.
Reimplemented in vtkColorLegend.
static vtkChartLegend* vtkChartLegend::New | ( | ) | [static] |
virtual void vtkChartLegend::SetPoint | ( | float | , |
float | |||
) | [virtual] |
Set point the legend box is anchored to.
void vtkChartLegend::SetPoint | ( | float | [2] | ) |
Set point the legend box is anchored to.
virtual float* vtkChartLegend::GetPoint | ( | ) | [virtual] |
Get point the legend box is anchored to.
virtual void vtkChartLegend::GetPoint | ( | float & | , |
float & | |||
) | [virtual] |
Get point the legend box is anchored to.
virtual void vtkChartLegend::GetPoint | ( | float | [2] | ) | [virtual] |
Get point the legend box is anchored to.
void vtkChartLegend::SetPoint | ( | const vtkVector2f & | point | ) |
Set point the legend box is anchored to.
const vtkVector2f& vtkChartLegend::GetPointVector | ( | ) |
Get point the legend box is anchored to.
virtual void vtkChartLegend::SetHorizontalAlignment | ( | int | ) | [virtual] |
Set the horizontal alignment of the legend to the point specified. Valid values are LEFT, CENTER and RIGHT.
virtual int vtkChartLegend::GetHorizontalAlignment | ( | ) | [virtual] |
Get the horizontal alignment of the legend to the point specified.
virtual void vtkChartLegend::SetVerticalAlignment | ( | int | ) | [virtual] |
Set the vertical alignment of the legend to the point specified. Valid values are TOP, CENTER and BOTTOM.
virtual int vtkChartLegend::GetVerticalAlignment | ( | ) | [virtual] |
Get the vertical alignment of the legend to the point specified.
virtual void vtkChartLegend::SetPadding | ( | int | ) | [virtual] |
Set the padding between legend marks, default is 5.
virtual int vtkChartLegend::GetPadding | ( | ) | [virtual] |
Get the padding between legend marks.
virtual void vtkChartLegend::SetSymbolWidth | ( | int | ) | [virtual] |
Set the symbol width, default is 15.
virtual int vtkChartLegend::GetSymbolWidth | ( | ) | [virtual] |
Get the legend symbol width.
virtual void vtkChartLegend::SetLabelSize | ( | int | size | ) | [virtual] |
Set the point size of the label text.
virtual int vtkChartLegend::GetLabelSize | ( | ) | [virtual] |
Get the point size of the label text.
virtual void vtkChartLegend::SetInline | ( | bool | ) | [virtual] |
Get/set if the legend should be drawn inline (inside the chart), or not. True would generally request that the chart draws it inside the chart, false would adjust the chart axes and make space to draw the axes outside.
virtual bool vtkChartLegend::GetInline | ( | ) | [virtual] |
Get/set if the legend should be drawn inline (inside the chart), or not. True would generally request that the chart draws it inside the chart, false would adjust the chart axes and make space to draw the axes outside.
virtual void vtkChartLegend::SetDragEnabled | ( | bool | ) | [virtual] |
Get/set if the legend can be dragged with the mouse button, or not. True results in left click and drag causing the legend to move around the scene. False disables response to mouse events. The default is true.
virtual bool vtkChartLegend::GetDragEnabled | ( | ) | [virtual] |
Get/set if the legend can be dragged with the mouse button, or not. True results in left click and drag causing the legend to move around the scene. False disables response to mouse events. The default is true.
void vtkChartLegend::SetChart | ( | vtkChart * | chart | ) |
Set the chart that the legend belongs to and will draw the legend for.
Get the chart that the legend belongs to and will draw the legend for.
virtual void vtkChartLegend::Update | ( | ) | [virtual] |
Update the geometry of the axis. Takes care of setting up the tick mark locations etc. Should be called by the scene before rendering.
Reimplemented from vtkAbstractContextItem.
Reimplemented in vtkColorLegend.
virtual bool vtkChartLegend::Paint | ( | vtkContext2D * | painter | ) | [virtual] |
Paint event for the axis, called whenever the axis needs to be drawn.
Reimplemented from vtkAbstractContextItem.
Reimplemented in vtkColorLegend.
virtual vtkRectf vtkChartLegend::GetBoundingRect | ( | vtkContext2D * | painter | ) | [virtual] |
Request the space the legend requires to be drawn. This is returned as a vtkRect4f, with the corner being the offset from Point, and the width/ height being the total width/height required by the axis. In order to ensure the numbers are correct, Update() should be called first.
Reimplemented in vtkColorLegend.
Get the pen used to draw the legend outline.
Get the brush used to draw the legend background.
Get the vtkTextProperty for the legend's labels.
virtual bool vtkChartLegend::Hit | ( | const vtkContextMouseEvent & | mouse | ) | [virtual] |
Return true if the supplied x, y coordinate is inside the item.
Reimplemented from vtkAbstractContextItem.
virtual bool vtkChartLegend::MouseMoveEvent | ( | const vtkContextMouseEvent & | mouse | ) | [virtual] |
Mouse move event.
Reimplemented from vtkAbstractContextItem.
virtual bool vtkChartLegend::MouseButtonPressEvent | ( | const vtkContextMouseEvent & | mouse | ) | [virtual] |
Mouse button down event
Reimplemented from vtkAbstractContextItem.
virtual bool vtkChartLegend::MouseButtonReleaseEvent | ( | const vtkContextMouseEvent & | mouse | ) | [virtual] |
Mouse button release event.
Reimplemented from vtkAbstractContextItem.
float* vtkChartLegend::Point [protected] |
Definition at line 188 of file vtkChartLegend.h.
int vtkChartLegend::HorizontalAlignment [protected] |
Definition at line 189 of file vtkChartLegend.h.
int vtkChartLegend::VerticalAlignment [protected] |
Definition at line 190 of file vtkChartLegend.h.
vtkNew<vtkPen> vtkChartLegend::Pen [protected] |
The pen used to draw the legend box.
Definition at line 193 of file vtkChartLegend.h.
vtkNew<vtkBrush> vtkChartLegend::Brush [protected] |
The brush used to render the background of the legend.
Definition at line 196 of file vtkChartLegend.h.
vtkNew<vtkTextProperty> vtkChartLegend::LabelProperties [protected] |
The text properties of the labels used in the legend.
Definition at line 199 of file vtkChartLegend.h.
bool vtkChartLegend::DragEnabled [protected] |
Should we move the legend box around in response to the mouse drag?
Definition at line 202 of file vtkChartLegend.h.
int vtkChartLegend::Button [protected] |
Last button to be pressed.
Definition at line 205 of file vtkChartLegend.h.
vtkTimeStamp vtkChartLegend::PlotTime [protected] |
Definition at line 207 of file vtkChartLegend.h.
vtkTimeStamp vtkChartLegend::RectTime [protected] |
Definition at line 208 of file vtkChartLegend.h.
vtkRectf vtkChartLegend::Rect [protected] |
Definition at line 210 of file vtkChartLegend.h.
int vtkChartLegend::Padding [protected] |
Padding between symbol and text.
Definition at line 213 of file vtkChartLegend.h.
int vtkChartLegend::SymbolWidth [protected] |
Width of the symbols in pixels in the legend.
Definition at line 216 of file vtkChartLegend.h.
bool vtkChartLegend::Inline [protected] |
Should the legend be drawn inline in its chart?
Definition at line 219 of file vtkChartLegend.h.
Private* vtkChartLegend::Storage [protected] |
Definition at line 222 of file vtkChartLegend.h.