11 #include "vtkCoordinate.h"
13 #include "vtkScalarBarActor.h"
14 #include "vtkSmartPointer.h"
18 class vtkColorTransferFunctionItem;
19 class vtkContextActor;
22 class vtkContextScene;
26 class vtkScalarsToColors;
27 class vtkScalarBarItem;
28 class vtkTextProperty;
32 :
public vtkScalarBarActor {
35 void PrintSelf(ostream& os, vtkIndent indent)
override;
57 enum { PrecedeScalarBar = 0, SucceedScalarBar };
167 void SetUseCustomLabels(
bool useLabels);
183 void SetNumberOfCustomLabels(vtkIdType numLabels);
184 vtkIdType GetNumberOfCustomLabels();
190 void SetCustomLabel(vtkIdType index,
double value);
195 int RenderOverlay(vtkViewport* viewport)
override;
200 int RenderOpaqueGeometry(vtkViewport* viewport)
override;
207 void ReleaseGraphicsResources(vtkWindow* window)
override;
212 virtual bool Paint(vtkContext2D* painter);
218 vtkRectf GetBoundingRect();
226 int GetEstimatedNumberOfAnnotations();
236 vtkContextActor* ActorDelegate;
238 int TitleJustification;
244 bool ForceHorizontalTitle;
249 int ScalarBarThickness;
254 double ScalarBarLength;
258 int AutomaticLabelFormat;
261 int AutomaticAnnotations;
262 int AddRangeAnnotations;
263 char* RangeLabelFormat;
268 int OutlineScalarBar;
281 bool UseCustomLabels;
303 vtkViewport* CurrentViewport;
314 void UpdateScalarBarTexture(vtkImageData*
image);
321 void GetSize(
double size[2], vtkContext2D* painter);
328 vtkRectf GetColorBarRect(
double size[2]);
334 vtkRectf GetFullColorBarRect(
double size[2]);
339 vtkRectf GetAboveRangeColorRect(
double size[2]);
344 vtkRectf GetBelowRangeColorRect(
double size[2]);
346 vtkRectf GetOutOfRangeColorRectInternal(
352 vtkRectf GetNaNColorRect(
double size[2]);
357 void UpdateTextProperties();
362 void PaintColorBar(vtkContext2D* painter,
double size[2]);
367 void PaintAxis(vtkContext2D* painter,
double size[2]);
372 void PaintTitle(vtkContext2D* painter,
double size[2]);
381 void PaintAnnotations(vtkContext2D* painter,
388 void PaintAnnotationsVertically(vtkContext2D* painter,
395 void PaintAnnotationsHorizontally(vtkContext2D* painter,
std::shared_ptr< core::Tensor > image
vtkSetMacro(OutlineScalarBar, int)
vtkSetMacro(AutomaticLabelFormat, int)
vtkSetClampMacro(ScalarBarThickness, int, 0, VTK_INT_MAX)
static vtkContext2DScalarBarActor * New()
vtkBooleanMacro(AddRangeAnnotations, int)
vtkBooleanMacro(ReverseLegend, bool)
vtkSetClampMacro(TitleJustification, int, VTK_TEXT_LEFT, VTK_TEXT_RIGHT)
vtkGetMacro(TitleJustification, int)
vtkGetStringMacro(RangeLabelFormat)
vtkGetMacro(UseCustomLabels, bool)
vtkGetMacro(OutlineScalarBar, int)
vtkGetMacro(ReverseLegend, bool)
vtkGetMacro(AutomaticLabelFormat, int)
vtkGetMacro(ForceHorizontalTitle, bool)
vtkGetMacro(DrawTickMarks, bool)
vtkSetMacro(AddRangeAnnotations, int)
vtkSetMacro(AddRangeLabels, int)
vtkSetMacro(ForceHorizontalTitle, bool)
vtkGetMacro(ScalarBarThickness, int)
vtkGetMacro(ScalarBarLength, double)
vtkSetClampMacro(ScalarBarLength, double, 0, 1)
vtkGetMacro(AddRangeLabels, int)
vtkBooleanMacro(AutomaticAnnotations, int)
vtkSetStringMacro(RangeLabelFormat)
vtkGetMacro(AddRangeAnnotations, int)
vtkSetMacro(DrawTickMarks, bool)
vtkGetMacro(AutomaticAnnotations, int)
vtkGetMacro(NumberOfTicks, int)
vtkSetMacro(NumberOfTicks, int)
vtkBooleanMacro(OutlineScalarBar, int)
vtkSetMacro(AutomaticAnnotations, int)
vtkTypeMacro(vtkContext2DScalarBarActor, vtkScalarBarActor)
vtkBooleanMacro(ForceHorizontalTitle, bool)
vtkBooleanMacro(AutomaticLabelFormat, int)
vtkSetMacro(ReverseLegend, bool)
#define QPCL_ENGINE_LIB_API