ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkContext2DScalarBarActor Class Reference

#include <vtkContext2DScalarBarActor.h>

Inheritance diagram for vtkContext2DScalarBarActor:
Collaboration diagram for vtkContext2DScalarBarActor:

Classes

class  vtkAnnotationMap
 
class  vtkScalarBarItem
 

Public Types

enum  { PrecedeScalarBar = 0 , SucceedScalarBar }
 
enum  OutOfRangeType { BELOW_RANGE = 0 , ABOVE_RANGE = 1 }
 

Public Member Functions

 vtkTypeMacro (vtkContext2DScalarBarActor, vtkScalarBarActor)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
 vtkGetMacro (TitleJustification, int)
 
 vtkSetClampMacro (TitleJustification, int, VTK_TEXT_LEFT, VTK_TEXT_RIGHT)
 
 vtkSetMacro (ForceHorizontalTitle, bool)
 
 vtkGetMacro (ForceHorizontalTitle, bool)
 
 vtkBooleanMacro (ForceHorizontalTitle, bool)
 
 vtkSetClampMacro (ScalarBarThickness, int, 0, VTK_INT_MAX)
 
 vtkGetMacro (ScalarBarThickness, int)
 
 vtkSetClampMacro (ScalarBarLength, double, 0, 1)
 
 vtkGetMacro (ScalarBarLength, double)
 
 vtkSetMacro (ReverseLegend, bool)
 
 vtkGetMacro (ReverseLegend, bool)
 
 vtkBooleanMacro (ReverseLegend, bool)
 
 vtkGetMacro (AutomaticLabelFormat, int)
 
 vtkSetMacro (AutomaticLabelFormat, int)
 
 vtkBooleanMacro (AutomaticLabelFormat, int)
 
 vtkSetMacro (AddRangeLabels, int)
 
 vtkGetMacro (AddRangeLabels, int)
 
 vtkSetMacro (AutomaticAnnotations, int)
 
 vtkGetMacro (AutomaticAnnotations, int)
 
 vtkBooleanMacro (AutomaticAnnotations, int)
 
 vtkGetMacro (AddRangeAnnotations, int)
 
 vtkSetMacro (AddRangeAnnotations, int)
 
 vtkBooleanMacro (AddRangeAnnotations, int)
 
 vtkGetMacro (OutlineScalarBar, int)
 
 vtkSetMacro (OutlineScalarBar, int)
 
 vtkBooleanMacro (OutlineScalarBar, int)
 
 vtkSetMacro (DrawTickMarks, bool)
 
 vtkGetMacro (DrawTickMarks, bool)
 
 vtkSetStringMacro (RangeLabelFormat)
 
 vtkGetStringMacro (RangeLabelFormat)
 
void SetUseCustomLabels (bool useLabels)
 
 vtkGetMacro (UseCustomLabels, bool)
 
 vtkSetMacro (NumberOfTicks, int)
 
 vtkGetMacro (NumberOfTicks, int)
 
void SetNumberOfCustomLabels (vtkIdType numLabels)
 
vtkIdType GetNumberOfCustomLabels ()
 
void SetCustomLabel (vtkIdType index, double value)
 
int RenderOverlay (vtkViewport *viewport) override
 
int RenderOpaqueGeometry (vtkViewport *viewport) override
 
void ReleaseGraphicsResources (vtkWindow *window) override
 
virtual bool Paint (vtkContext2D *painter)
 
vtkRectf GetBoundingRect ()
 
int GetEstimatedNumberOfAnnotations ()
 

Static Public Member Functions

static vtkContext2DScalarBarActorNew ()
 

Protected Member Functions

 vtkContext2DScalarBarActor ()
 
 ~vtkContext2DScalarBarActor () override
 

Detailed Description

Definition at line 31 of file vtkContext2DScalarBarActor.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
PrecedeScalarBar 
SucceedScalarBar 

Definition at line 57 of file vtkContext2DScalarBarActor.h.

◆ OutOfRangeType

Enumerator
BELOW_RANGE 
ABOVE_RANGE 

Definition at line 59 of file vtkContext2DScalarBarActor.h.

Constructor & Destructor Documentation

◆ vtkContext2DScalarBarActor()

vtkContext2DScalarBarActor::vtkContext2DScalarBarActor ( )
protected

◆ ~vtkContext2DScalarBarActor()

vtkContext2DScalarBarActor::~vtkContext2DScalarBarActor ( )
overrideprotected

Definition at line 157 of file vtkContext2DScalarBarActor.cpp.

References NULL.

Member Function Documentation

◆ GetBoundingRect()

vtkRectf vtkContext2DScalarBarActor::GetBoundingRect ( )

Get the bounding rectangle of the scalar bar actor contents in display coordinates.

Definition at line 1044 of file vtkContext2DScalarBarActor.cpp.

References vtkBoundingRectContextDevice2D::GetBoundingRect().

Referenced by vtkScalarBarRepresentationCustom::RenderOverlay().

◆ GetEstimatedNumberOfAnnotations()

int vtkContext2DScalarBarActor::GetEstimatedNumberOfAnnotations ( )

Get an estimated number of annotations emulating loosely the algorithm generating the annotations. The actual number of annotations can be slightly lower than the return of this method when using automatic annotations.

Definition at line 1297 of file vtkContext2DScalarBarActor.cpp.

◆ GetNumberOfCustomLabels()

vtkIdType vtkContext2DScalarBarActor::GetNumberOfCustomLabels ( )

Definition at line 183 of file vtkContext2DScalarBarActor.cpp.

◆ New()

static vtkContext2DScalarBarActor* vtkContext2DScalarBarActor::New ( )
static

◆ Paint()

bool vtkContext2DScalarBarActor::Paint ( vtkContext2D *  painter)
virtual

Responsible for actually drawing the scalar bar.

Definition at line 988 of file vtkContext2DScalarBarActor.cpp.

References size.

Referenced by vtkContext2DScalarBarActor::vtkScalarBarItem::Paint().

◆ PrintSelf()

void vtkContext2DScalarBarActor::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

Definition at line 1292 of file vtkContext2DScalarBarActor.cpp.

◆ ReleaseGraphicsResources()

void vtkContext2DScalarBarActor::ReleaseGraphicsResources ( vtkWindow *  window)
override

Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

Definition at line 217 of file vtkContext2DScalarBarActor.cpp.

◆ RenderOpaqueGeometry()

int vtkContext2DScalarBarActor::RenderOpaqueGeometry ( vtkViewport *  viewport)
override

Draw the scalar bar and annotation text to the screen.

Definition at line 210 of file vtkContext2DScalarBarActor.cpp.

◆ RenderOverlay()

int vtkContext2DScalarBarActor::RenderOverlay ( vtkViewport *  viewport)
override

We only render in the overlay for the context scene.

Definition at line 198 of file vtkContext2DScalarBarActor.cpp.

◆ SetCustomLabel()

void vtkContext2DScalarBarActor::SetCustomLabel ( vtkIdType  index,
double  value 
)

Set label for index.

Definition at line 188 of file vtkContext2DScalarBarActor.cpp.

◆ SetNumberOfCustomLabels()

void vtkContext2DScalarBarActor::SetNumberOfCustomLabels ( vtkIdType  numLabels)

Set number of custom labels.

Definition at line 178 of file vtkContext2DScalarBarActor.cpp.

◆ SetUseCustomLabels()

void vtkContext2DScalarBarActor::SetUseCustomLabels ( bool  useLabels)

Use custom labels.

Definition at line 170 of file vtkContext2DScalarBarActor.cpp.

◆ vtkBooleanMacro() [1/6]

vtkContext2DScalarBarActor::vtkBooleanMacro ( AddRangeAnnotations  ,
int   
)

◆ vtkBooleanMacro() [2/6]

vtkContext2DScalarBarActor::vtkBooleanMacro ( AutomaticAnnotations  ,
int   
)

◆ vtkBooleanMacro() [3/6]

vtkContext2DScalarBarActor::vtkBooleanMacro ( AutomaticLabelFormat  ,
int   
)

◆ vtkBooleanMacro() [4/6]

vtkContext2DScalarBarActor::vtkBooleanMacro ( ForceHorizontalTitle  ,
bool   
)

◆ vtkBooleanMacro() [5/6]

vtkContext2DScalarBarActor::vtkBooleanMacro ( OutlineScalarBar  ,
int   
)

◆ vtkBooleanMacro() [6/6]

vtkContext2DScalarBarActor::vtkBooleanMacro ( ReverseLegend  ,
bool   
)

◆ vtkGetMacro() [1/13]

vtkContext2DScalarBarActor::vtkGetMacro ( AddRangeAnnotations  ,
int   
)

Set whether the scalar data range endpoints (minimum and maximum) are added as annotations.

◆ vtkGetMacro() [2/13]

vtkContext2DScalarBarActor::vtkGetMacro ( AddRangeLabels  ,
int   
)

◆ vtkGetMacro() [3/13]

vtkContext2DScalarBarActor::vtkGetMacro ( AutomaticAnnotations  ,
int   
)

◆ vtkGetMacro() [4/13]

vtkContext2DScalarBarActor::vtkGetMacro ( AutomaticLabelFormat  ,
int   
)

If true (the default), the printf format used for the labels will be automatically generated to make the numbers best fit within the widget. If false, the LabelFormat ivar will be used.

◆ vtkGetMacro() [5/13]

vtkContext2DScalarBarActor::vtkGetMacro ( DrawTickMarks  ,
bool   
)

◆ vtkGetMacro() [6/13]

vtkContext2DScalarBarActor::vtkGetMacro ( ForceHorizontalTitle  ,
bool   
)

◆ vtkGetMacro() [7/13]

vtkContext2DScalarBarActor::vtkGetMacro ( NumberOfTicks  ,
int   
)

◆ vtkGetMacro() [8/13]

vtkContext2DScalarBarActor::vtkGetMacro ( OutlineScalarBar  ,
int   
)

Flag that controls whether an outline is drawn around the scalar bar.

◆ vtkGetMacro() [9/13]

vtkContext2DScalarBarActor::vtkGetMacro ( ReverseLegend  ,
bool   
)

◆ vtkGetMacro() [10/13]

vtkContext2DScalarBarActor::vtkGetMacro ( ScalarBarLength  ,
double   
)

◆ vtkGetMacro() [11/13]

vtkContext2DScalarBarActor::vtkGetMacro ( ScalarBarThickness  ,
int   
)

◆ vtkGetMacro() [12/13]

vtkContext2DScalarBarActor::vtkGetMacro ( TitleJustification  ,
int   
)

Set the title justification. Valid values are VTK_TEXT_LEFT, VTK_TEXT_CENTERED, and VTK_TEXT_RIGHT.

◆ vtkGetMacro() [13/13]

vtkContext2DScalarBarActor::vtkGetMacro ( UseCustomLabels  ,
bool   
)

◆ vtkGetStringMacro()

vtkContext2DScalarBarActor::vtkGetStringMacro ( RangeLabelFormat  )

◆ vtkSetClampMacro() [1/3]

vtkContext2DScalarBarActor::vtkSetClampMacro ( ScalarBarLength  ,
double  ,
,
 
)

Set the scalar bar length. When the orientation is VTK_ORIENT_VERTICAL, this sets the scalar bar height. When the orientation is VTK_ORIENT_HORIZONTAL, this sets the scalar bar width. Specified in normalized viewport coordinates, meaning the value is the fractional span of the viewport's width or height in the range [0, 1], depending on orientation.

◆ vtkSetClampMacro() [2/3]

vtkContext2DScalarBarActor::vtkSetClampMacro ( ScalarBarThickness  ,
int  ,
,
VTK_INT_MAX   
)

Set the scalar bar thickness. When the orientation is VTK_ORIENT_VERTICAL, this sets the scalar bar width. When the orientation is VTK_ORIENT_HORIZONTAL, this sets the scalar bar height. Specified in points akin to font size.

◆ vtkSetClampMacro() [3/3]

vtkContext2DScalarBarActor::vtkSetClampMacro ( TitleJustification  ,
int  ,
VTK_TEXT_LEFT  ,
VTK_TEXT_RIGHT   
)

◆ vtkSetMacro() [1/9]

vtkContext2DScalarBarActor::vtkSetMacro ( AddRangeAnnotations  ,
int   
)

◆ vtkSetMacro() [2/9]

vtkContext2DScalarBarActor::vtkSetMacro ( AddRangeLabels  ,
int   
)

Set/get whether to add range labels or not. These are labels that have the minimum/maximum values of the scalar bar range.

◆ vtkSetMacro() [3/9]

vtkContext2DScalarBarActor::vtkSetMacro ( AutomaticAnnotations  ,
int   
)

Set whether annotations are automatically created according the number of discrete colors. Default is FALSE;

◆ vtkSetMacro() [4/9]

vtkContext2DScalarBarActor::vtkSetMacro ( AutomaticLabelFormat  ,
int   
)

◆ vtkSetMacro() [5/9]

vtkContext2DScalarBarActor::vtkSetMacro ( DrawTickMarks  ,
bool   
)

Set/get whether tick marks should be drawn.

◆ vtkSetMacro() [6/9]

vtkContext2DScalarBarActor::vtkSetMacro ( ForceHorizontalTitle  ,
bool   
)

If this flag is on, the title will be drawn horizontally above the scalar bar. Off by default.

◆ vtkSetMacro() [7/9]

vtkContext2DScalarBarActor::vtkSetMacro ( NumberOfTicks  ,
int   
)

Set/get whether to add range labels or not. These are labels that have the minimum/maximum values of the scalar bar range.

◆ vtkSetMacro() [8/9]

vtkContext2DScalarBarActor::vtkSetMacro ( OutlineScalarBar  ,
int   
)

◆ vtkSetMacro() [9/9]

vtkContext2DScalarBarActor::vtkSetMacro ( ReverseLegend  ,
bool   
)

Set whether the scalar bar is reversed ie from high to low instead of from low to high. Default is false;

◆ vtkSetStringMacro()

vtkContext2DScalarBarActor::vtkSetStringMacro ( RangeLabelFormat  )

Printf format for range labels.

◆ vtkTypeMacro()

vtkContext2DScalarBarActor::vtkTypeMacro ( vtkContext2DScalarBarActor  ,
vtkScalarBarActor   
)

The documentation for this class was generated from the following files: