59 #ifndef vtkScalarBarActor_h
60 #define vtkScalarBarActor_h
62 #include "vtkRenderingAnnotationModule.h"
77 #define VTK_ORIENT_HORIZONTAL 0
78 #define VTK_ORIENT_VERTICAL 1
112 virtual
void ReleaseGraphicsResources(
vtkWindow*) VTK_OVERRIDE;
119 virtual
void GetScalarBarRect(
int rect[4],
vtkViewport* viewport);
141 vtkGetMacro(UseOpacity,
int);
151 vtkSetClampMacro(MaximumNumberOfColors,
int, 2,
VTK_INT_MAX);
152 vtkGetMacro(MaximumNumberOfColors,
int);
159 vtkSetClampMacro(NumberOfLabels,
int, 0, 64);
160 vtkGetMacro(NumberOfLabels,
int);
168 vtkGetMacro(Orientation,
int);
169 void SetOrientationToHorizontal()
203 vtkSetStringMacro(LabelFormat);
211 vtkSetStringMacro(Title);
219 vtkSetStringMacro(ComponentTitle);
233 vtkGetMacro(TextureGridWidth,
double);
243 enum { PrecedeScalarBar = 0, SucceedScalarBar };
254 vtkSetClampMacro(TextPosition,
int, PrecedeScalarBar, SucceedScalarBar);
255 vtkGetMacro(TextPosition,
int);
271 vtkGetMacro(MaximumWidthInPixels,
int);
273 vtkGetMacro(MaximumHeightInPixels,
int);
283 vtkGetMacro(AnnotationLeaderPadding,
double);
293 vtkGetMacro(DrawAnnotations,
int);
304 vtkGetMacro(DrawNanAnnotation,
int);
315 vtkGetMacro(DrawBelowRangeSwatch,
bool);
323 vtkSetStringMacro(BelowRangeAnnotation);
334 vtkGetMacro(DrawAboveRangeSwatch,
bool);
342 vtkSetStringMacro(AboveRangeAnnotation);
355 vtkGetMacro(FixedAnnotationLeaderLineColor,
int);
363 vtkSetStringMacro(NanAnnotation);
377 vtkGetMacro(AnnotationTextScaling,
int);
387 vtkGetMacro(DrawBackground,
int);
397 vtkGetMacro(DrawFrame,
int);
407 vtkGetMacro(DrawColorBar,
int);
416 vtkGetMacro(DrawTickLabels,
int);
441 vtkGetMacro(TextPad,
int);
451 vtkGetMacro(VerticalTitleSeparation,
int);
460 vtkGetMacro(BarRatio,
double);
461 vtkSetClampMacro(BarRatio,
double, 0., 1.);
471 vtkGetMacro(TitleRatio,
double);
472 vtkSetClampMacro(TitleRatio,
double, 0., 1.);
482 vtkGetMacro(UnconstrainedFontSize,
bool);
521 virtual int RebuildLayoutIfNeeded(
vtkViewport* viewport);
527 virtual void FreeLayoutStorage();
537 virtual void ComputeFrame();
548 virtual void ComputeScalarBarThickness();
553 virtual void ComputeSwatchPad();
557 virtual void LayoutNanSwatch();
565 virtual void LayoutBelowRangeSwatch();
573 virtual void LayoutAboveRangeSwatch();
581 virtual void LayoutAboveRangeSwatchPosn();
586 virtual void PrepareTitleText();
598 virtual void LayoutTitle();
604 virtual void LayoutForUnconstrainedFont();
614 virtual void ComputeScalarBarLength();
625 virtual void LayoutTicks();
634 virtual void LayoutAnnotations();
639 virtual void ConfigureAnnotations();
644 virtual void ConfigureFrame();
649 virtual void DrawBoxes();
654 virtual void ConfigureScalarBar();
659 virtual void ConfigureTitle();
664 virtual void ConfigureTicks();
672 virtual void ConfigureNanSwatch();
678 virtual void ConfigureAboveBelowRangeSwatch(
bool above);
695 virtual void SizeTitle(
double* titleSize,
int*
size,
vtkViewport* viewport);
700 int MapAnnotationLabels(
706 int PlaceAnnotationsVertically(
707 double barX,
double barY,
double barWidth,
double barHeight,
708 double delta,
double pad);
712 int PlaceAnnotationsHorizontally(
713 double barX,
double barY,
double barWidth,
double barHeight,
714 double delta,
double pad);