Commit fb487d65 authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Added iVars for background and frame; and ancillary methods.

Change-Id: Id19f5c43b42d02e1ebfb06a00e6f39ecc4f3af4b
parent dca7f475
......@@ -37,6 +37,8 @@ vtkStandardNewMacro(vtkScalarBarActor);
vtkCxxSetObjectMacro(vtkScalarBarActor,LookupTable,vtkScalarsToColors);
vtkCxxSetObjectMacro(vtkScalarBarActor,LabelTextProperty,vtkTextProperty);
vtkCxxSetObjectMacro(vtkScalarBarActor,TitleTextProperty,vtkTextProperty);
vtkCxxSetObjectMacro(vtkScalarBarActor,BackgroundProperty,vtkProperty2D);
vtkCxxSetObjectMacro(vtkScalarBarActor,FrameProperty,vtkProperty2D);
//----------------------------------------------------------------------------
// Instantiate object with 64 maximum colors; 5 labels; %%-#6.3g label
......
......@@ -57,6 +57,7 @@
class vtkPolyData;
class vtkPolyDataMapper2D;
class vtkProperty2D;
class vtkScalarsToColors;
class vtkTextMapper;
class vtkTextProperty;
......@@ -196,6 +197,31 @@ public:
vtkSetMacro( MaximumHeightInPixels, int );
vtkGetMacro( MaximumHeightInPixels, int );
// Description:
// Set/Get whether a background should be drawn around the scalar bar.
// Default is off.
vtkSetMacro( DrawBackground, int );
vtkGetMacro( DrawBackground, int );
vtkBooleanMacro( DrawBackground, int );
// Description:
// Set/Get whether a frame should be drawn around the scalar bar.
// Default is off.
vtkSetMacro( DrawFrame, int );
vtkGetMacro( DrawFrame, int );
vtkBooleanMacro( DrawFrame, int );
// Description:
// Set/Get the background property.
virtual void SetBackgroundProperty(vtkProperty2D *p);
vtkGetObjectMacro(BackgroundProperty,vtkProperty2D);
// Description:
// Set/Get the frame property.
virtual void SetFrameProperty(vtkProperty2D *p);
vtkGetObjectMacro(FrameProperty,vtkProperty2D);
protected:
vtkScalarBarActor();
~vtkScalarBarActor();
......@@ -239,6 +265,19 @@ protected:
int MaximumWidthInPixels;
int MaximumHeightInPixels;
vtkProperty2D *BackgroundProperty;
vtkProperty2D *FrameProperty;
int DrawBackground; // off by default
int DrawFrame; // off by default
vtkPolyData *Background;
vtkPolyDataMapper2D *BackgroundMapper;
vtkActor2D *BackgroundActor;
vtkPolyData *Frame;
vtkPolyDataMapper2D *FrameMapper;
vtkActor2D *FrameActor;
private:
vtkScalarBarActor(const vtkScalarBarActor&); // Not implemented.
void operator=(const vtkScalarBarActor&); // Not implemented.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment