47 #ifndef vtkScalarBarActor_h
48 #define vtkScalarBarActor_h
52 #include "vtkRenderingAnnotationModule.h"
55 VTK_ABI_NAMESPACE_BEGIN
69 #define VTK_ORIENT_HORIZONTAL 0
70 #define VTK_ORIENT_VERTICAL 1
111 virtual void GetScalarBarRect(
int rect[4],
vtkViewport* viewport);
160 vtkSetClampMacro(MaximumNumberOfColors,
int, 2,
VTK_INT_MAX);
161 vtkGetMacro(MaximumNumberOfColors,
int);
168 vtkSetClampMacro(NumberOfLabels,
int, 0, 64);
169 vtkGetMacro(NumberOfLabels,
int);
185 vtkGetMacro(UseCustomLabels,
bool);
186 vtkSetMacro(UseCustomLabels,
bool);
187 vtkBooleanMacro(UseCustomLabels,
bool);
195 vtkGetMacro(Orientation,
int);
204 vtkGetMacro(ForceVerticalTitle,
bool);
205 vtkSetMacro(ForceVerticalTitle,
bool);
237 vtkSetStringMacro(LabelFormat);
238 vtkGetStringMacro(LabelFormat);
245 vtkSetStringMacro(Title);
246 vtkGetStringMacro(Title);
253 vtkSetStringMacro(ComponentTitle);
254 vtkGetStringMacro(ComponentTitle);
266 vtkSetMacro(TextureGridWidth,
double);
267 vtkGetMacro(TextureGridWidth,
double);
279 PrecedeScalarBar = 0,
292 vtkSetClampMacro(TextPosition,
int, PrecedeScalarBar, SucceedScalarBar);
293 vtkGetMacro(TextPosition,
int);
312 vtkSetMacro(MaximumWidthInPixels,
int);
313 vtkGetMacro(MaximumWidthInPixels,
int);
314 vtkSetMacro(MaximumHeightInPixels,
int);
315 vtkGetMacro(MaximumHeightInPixels,
int);
324 vtkSetMacro(AnnotationLeaderPadding,
double);
325 vtkGetMacro(AnnotationLeaderPadding,
double);
356 vtkSetMacro(DrawBelowRangeSwatch,
bool);
357 vtkGetMacro(DrawBelowRangeSwatch,
bool);
358 vtkBooleanMacro(DrawBelowRangeSwatch,
bool);
365 vtkSetStringMacro(BelowRangeAnnotation);
366 vtkGetStringMacro(BelowRangeAnnotation);
375 vtkSetMacro(DrawAboveRangeSwatch,
bool);
376 vtkGetMacro(DrawAboveRangeSwatch,
bool);
377 vtkBooleanMacro(DrawAboveRangeSwatch,
bool);
384 vtkSetStringMacro(AboveRangeAnnotation);
385 vtkGetStringMacro(AboveRangeAnnotation);
396 vtkSetMacro(FixedAnnotationLeaderLineColor,
vtkTypeBool);
397 vtkGetMacro(FixedAnnotationLeaderLineColor,
vtkTypeBool);
398 vtkBooleanMacro(FixedAnnotationLeaderLineColor,
vtkTypeBool);
405 vtkSetStringMacro(NanAnnotation);
406 vtkGetStringMacro(NanAnnotation);
420 vtkBooleanMacro(AnnotationTextScaling,
vtkTypeBool);
483 vtkGetMacro(TextPad,
int);
484 vtkSetMacro(TextPad,
int);
492 vtkGetMacro(VerticalTitleSeparation,
int);
493 vtkSetMacro(VerticalTitleSeparation,
int);
501 vtkGetMacro(BarRatio,
double);
502 vtkSetClampMacro(BarRatio,
double, 0., 1.);
512 vtkGetMacro(TitleRatio,
double);
513 vtkSetClampMacro(TitleRatio,
double, 0., 1.);
523 vtkSetMacro(UnconstrainedFontSize,
bool);
524 vtkGetMacro(UnconstrainedFontSize,
bool);
525 vtkBooleanMacro(UnconstrainedFontSize,
bool);
569 virtual int RebuildLayoutIfNeeded(
vtkViewport* viewport);
574 virtual void FreeLayoutStorage();
584 virtual void ComputeFrame();
595 virtual void ComputeScalarBarThickness();
600 virtual void ComputeSwatchPad();
604 virtual void LayoutNanSwatch();
612 virtual void LayoutBelowRangeSwatch();
620 virtual void LayoutAboveRangeSwatch();
628 virtual void LayoutAboveRangeSwatchPosn();
633 virtual void PrepareTitleText();
645 virtual void LayoutTitle();
651 virtual void LayoutForUnconstrainedFont();
661 virtual void ComputeScalarBarLength();
674 virtual void LayoutTicks();
683 virtual void LayoutAnnotations();
688 virtual void ConfigureAnnotations();
693 virtual void ConfigureFrame();
698 virtual void DrawBoxes();
703 virtual void ConfigureScalarBar();
708 virtual void ConfigureTitle();
713 virtual void ConfigureTicks();
721 virtual void ConfigureNanSwatch();
727 virtual void ConfigureAboveBelowRangeSwatch(
bool above);
744 virtual void SizeTitle(
double* titleSize,
int*
size,
vtkViewport* viewport);
749 int MapAnnotationLabels(
755 int PlaceAnnotationsVertically(
756 double barX,
double barY,
double barWidth,
double barHeight,
double delta,
double pad);
761 int PlaceAnnotationsHorizontally(
762 double barX,
double barY,
double barWidth,
double barHeight,
double delta,
double pad);
771 bool UseCustomLabels =
false;
842 VTK_ABI_NAMESPACE_END
abstract superclass for all actors, volumes and annotations
int TextPad
User-changeable settings.
int MaximumWidthInPixels
User-changeable settings.
virtual void EditAnnotations()
Subclasses may override this method to alter this->P->Labels, allowing the addition and removal of an...
double TitleRatio
User-changeable settings.
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
vtkTypeBool FixedAnnotationLeaderLineColor
User-changeable settings.
actor that draws 2D data with texture support
vtkPolyDataMapper2D * ScalarBarMapper
Mapper for ScalarBar.
Defines a 1D piecewise function.
abstract specification for Viewports
virtual void SetTextPositionToPrecedeScalarBar()
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the view...
vtkScalarsToColors * LookupTable
The object this actor illustrates.
vtkPolyDataMapper2D * BackgroundMapper
Mapper for Background.
a actor that draws 2D data
record modification and/or execution time
Internal state for the scalar bar actor shared with subclasses.
virtual void SetPositionCoordinate(vtkCoordinate *)
Get the PositionCoordinate instance of vtkCoordinate.
int NumberOfLabelsBuilt
User-changeable settings.
vtkActor2D * FrameActor
Actor for Frame.
Create a scalar bar with labels.
int VerticalTitleSeparation
User-changeable settings.
char * AboveRangeAnnotation
User-changeable settings.
concrete dataset represents vertices, lines, polygons, and triangle strips
double TextureGridWidth
User-changeable settings.
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkActor2D.
vtkTexture * Texture
Color data for TexturePolyData.
vtkTypeBool AnnotationTextScaling
User-changeable settings.
vtkTypeBool DrawAnnotations
User-changeable settings.
dynamic, self-adjusting array of double
char * BelowRangeAnnotation
User-changeable settings.
char * ComponentTitle
User-changeable settings.
#define VTK_ORIENT_VERTICAL
int MaximumHeightInPixels
User-changeable settings.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the scalar bar and annotation text to the screen.
char * Title
User-changeable settings.
Superclass for mapping scalar values to colors.
window superclass for vtkRenderWindow
vtkActor2D * BackgroundActor
Actor for Background.
An actor that displays text.
#define VTK_ORIENT_HORIZONTAL
Some derived classes for the different colors commonly used.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
a simple class to control print indentation
char * LabelFormat
User-changeable settings.
vtkScalarBarActorInternal * P
Containers shared with subclasses.
int NumberOfLabels
User-changeable settings.
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
double AnnotationLeaderPadding
User-changeable settings.
handles properties associated with a texture map
int Orientation
User-changeable settings.
int TextPosition
User-changeable settings.
vtkPolyData * ScalarBar
Polygon(s) colored by LookupTable.
vtkTypeBool UseOpacity
User-changeable settings.
bool DrawBelowRangeSwatch
User-changeable settings.
vtkProperty2D * BackgroundProperty
User-changeable settings.
vtkActor2D * ScalarBarActor
Actor for ScalarBar.
vtkPiecewiseFunction * OpacityFunction
The opacity function if UseOpacity is true.
represent text properties.
vtkPolyData * Background
Polygon used to fill the background.
vtkTextProperty * LabelTextProperty
Font for tick labels.
vtkTimeStamp BuildTime
Internal state used for rendering.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
vtkTextProperty * TitleTextProperty
Font for the legend title.
int MaximumNumberOfColors
User-changeable settings.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
char * NanAnnotation
User-changeable settings.
bool ForceVerticalTitle
User-changeable settings.
vtkTypeBool DrawBackground
User-changeable settings.
vtkTypeBool DrawColorBar
User-changeable settings.
double BarRatio
User-changeable settings.
vtkTypeBool DrawFrame
User-changeable settings.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkTextProperty * AnnotationTextProperty
Font for annotation labels.
vtkTextActor * TitleActor
The legend title text renderer.
vtkPolyDataMapper2D * FrameMapper
Mapper for Frame.
represent surface properties of a 2D image
virtual void SetTextPositionToSucceedScalarBar()
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the view...
void SetOrientationToVertical()
Control the orientation of the scalar bar.
bool DrawAboveRangeSwatch
User-changeable settings.
void SetOrientationToHorizontal()
Control the orientation of the scalar bar.
vtkProperty2D * FrameProperty
User-changeable settings.
bool UnconstrainedFontSize
User-changeable settings.
vtkPolyData * Frame
Polyline used to highlight frame.
vtkTypeBool DrawTickLabels
User-changeable settings.
draw vtkPolyData onto the image plane
vtkPolyData * TexturePolyData
Polygon colored when UseOpacity is true.
vtkTypeBool DrawNanAnnotation
User-changeable settings.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTexturedActor2D * TextureActor
Actor for TexturePolyData.