14 #ifndef vtkContext2DScalarBarActor_h 15 #define vtkContext2DScalarBarActor_h 49 vtkGetMacro(TitleJustification,
int);
50 vtkSetClampMacro(TitleJustification,
int, VTK_TEXT_LEFT, VTK_TEXT_RIGHT);
58 vtkSetMacro(ForceHorizontalTitle,
bool);
59 vtkGetMacro(ForceHorizontalTitle,
bool);
60 vtkBooleanMacro(ForceHorizontalTitle,
bool);
82 vtkSetClampMacro(ScalarBarThickness,
int, 0, VTK_INT_MAX);
83 vtkGetMacro(ScalarBarThickness,
int);
95 vtkSetClampMacro(ScalarBarLength,
double, 0, 1);
96 vtkGetMacro(ScalarBarLength,
double);
103 vtkSetMacro(DrawScalarBarOutline,
bool);
104 vtkGetMacro(DrawScalarBarOutline,
bool);
105 vtkBooleanMacro(DrawScalarBarOutline,
bool);
112 vtkSetVector3Macro(ScalarBarOutlineColor,
double);
113 vtkGetVector3Macro(ScalarBarOutlineColor,
double);
120 vtkSetClampMacro(ScalarBarOutlineThickness,
int, 0, VTK_INT_MAX);
121 vtkGetMacro(ScalarBarOutlineThickness,
int);
129 vtkSetVector4Macro(BackgroundColor,
double);
131 vtkGetVector4Macro(BackgroundColor,
double);
138 vtkSetMacro(BackgroundPadding,
double);
140 vtkGetMacro(BackgroundPadding,
double);
147 vtkSetMacro(ReverseLegend,
bool);
148 vtkGetMacro(ReverseLegend,
bool);
149 vtkBooleanMacro(ReverseLegend,
bool);
158 vtkGetMacro(AutomaticLabelFormat,
int);
159 vtkSetMacro(AutomaticLabelFormat,
int);
160 vtkBooleanMacro(AutomaticLabelFormat,
int);
167 vtkSetMacro(VerticalLabels,
bool);
168 vtkGetMacro(VerticalLabels,
bool);
169 vtkBooleanMacro(VerticalLabels,
bool);
177 vtkSetMacro(AddRangeLabels,
int);
178 vtkGetMacro(AddRangeLabels,
int);
186 vtkSetMacro(AutomaticAnnotations,
int);
187 vtkGetMacro(AutomaticAnnotations,
int);
188 vtkBooleanMacro(AutomaticAnnotations,
int);
196 vtkGetMacro(AddRangeAnnotations,
int);
197 vtkSetMacro(AddRangeAnnotations,
int);
198 vtkBooleanMacro(AddRangeAnnotations,
int);
205 vtkSetMacro(DrawTickMarks,
bool);
206 vtkGetMacro(DrawTickMarks,
bool);
213 vtkSetMacro(AllowOverlappingLabels,
bool);
214 vtkGetMacro(AllowOverlappingLabels,
bool);
215 vtkBooleanMacro(AllowOverlappingLabels,
int);
222 virtual void SetRangeLabelFormat(
const char* format);
223 vtkGetStringMacro(RangeLabelFormat);
230 virtual void SetDataRangeLabelFormat(
const char* format);
231 vtkGetStringMacro(DataRangeLabelFormat);
238 void SetNumberOfCustomLabels(
vtkIdType numLabels);
245 void SetCustomLabel(
vtkIdType index,
double value);
281 int GetEstimatedNumberOfAnnotations();
288 vtkSetMacro(DrawDataRange,
bool);
289 vtkGetMacro(DrawDataRange,
bool);
290 vtkBooleanMacro(DrawDataRange,
bool);
299 vtkSetMacro(DataRangeMin,
double);
300 vtkGetMacro(DataRangeMin,
double);
309 vtkSetMacro(DataRangeMax,
double);
310 vtkGetMacro(DataRangeMax,
double);
326 double DataRangeMin = 0;
327 double DataRangeMax = 0;
333 int VerticalOffset = 0;
341 int TitleJustification;
347 bool ForceHorizontalTitle;
352 double ScalarBarOutlineColor[3];
357 int ScalarBarThickness;
362 double BackgroundColor[4];
367 double BackgroundPadding;
372 double ScalarBarLength;
374 int AutomaticLabelFormat;
379 int AutomaticAnnotations;
380 int AddRangeAnnotations;
381 char* RangeLabelFormat;
382 char* DataRangeLabelFormat;
387 bool AllowOverlappingLabels;
392 bool DrawScalarBarOutline;
397 int ScalarBarOutlineThickness;
419 class vtkScalarBarItem;
420 vtkScalarBarItem* ScalarBarItem;
435 bool InGetBoundingRect;
464 vtkRectf GetColorBarRect(
double size[2],
bool includeSwatch =
true);
470 vtkRectf GetFullColorBarRect(
double size[2]);
475 vtkRectf GetAboveRangeColorRect(
double size[2]);
480 vtkRectf GetBelowRangeColorRect(
double size[2]);
482 vtkRectf GetOutOfRangeColorRectInternal(
488 vtkRectf GetNaNColorRect(
double size[2]);
493 void UpdateTextProperties();
498 void PaintColorBar(
vtkContext2D* painter,
double size[2]);
515 class vtkAnnotationMap;
522 void PaintAnnotations(
vtkContext2D* painter,
double size[2],
const vtkAnnotationMap& map);
527 void PaintAnnotationsVertically(
528 vtkContext2D* painter,
double size[2],
const vtkAnnotationMap& map);
533 void PaintAnnotationsHorizontally(
534 vtkContext2D* painter,
double size[2],
const vtkAnnotationMap& map);
539 float HorizontalAnnotationHeight;
544 float VerticalRangeDataHeight;
547 #endif // vtkContext2DScalarBarActor_h #define VTKREMOTINGVIEWS_EXPORT
int RenderOverlay(vtkViewport *viewport)
bool DrawDataRange
Flag to show the range on the scalar bar.
void PrintSelf(ostream &os, vtkIndent indent)
int RenderOpaqueGeometry(vtkViewport *viewport)
static vtkScalarBarActor * New()
Custom scalar bar actor for ParaView that uses the Charts API.
void operator=(const vtkObjectBase &)
virtual void ReleaseGraphicsResources(vtkWindow *)