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

Adding variables and methods for title and label texts

Change-Id: Ibdc99b8c0fea17ddf87e214a51235890d8744d7d
parent 5e011eee
......@@ -46,6 +46,18 @@ vtkCubeAxesActor::vtkCubeAxesActor() : vtkActor()
this->FlyMode = VTK_FLY_CLOSEST_TRIAD;
// Title and label text properties
for (i = 0; i < 3; i++)
{
this->TitleTextProperty[i] = vtkTextProperty::New();
this->TitleTextProperty[i]->SetColor(1.,1.,1.);
this->TitleTextProperty[i]->SetFontFamilyToArial();
this->LabelTextProperty[i] = vtkTextProperty::New();
this->LabelTextProperty[i]->SetColor(1.,1.,1.);
this->LabelTextProperty[i]->SetFontFamilyToArial();
}
// Axis lines
this->XAxesLinesProperty = vtkProperty::New();
this->YAxesLinesProperty = vtkProperty::New();
......@@ -136,17 +148,6 @@ vtkCubeAxesActor::vtkCubeAxesActor() : vtkActor()
this->ZAxes[i]->GetTitleActor()->SetScreenOffset(this->TitleScreenOffset);
}
for (i = 0; i < 3; i++)
{
this->TitleTextProperty[i] = vtkTextProperty::New();
this->TitleTextProperty[i]->SetColor(1.,1.,1.);
this->TitleTextProperty[i]->SetFontFamilyToArial();
this->LabelTextProperty[i] = vtkTextProperty::New();
this->LabelTextProperty[i]->SetColor(1.,1.,1.);
this->LabelTextProperty[i]->SetFontFamilyToArial();
}
this->XTitle = new char[7];
sprintf(this->XTitle, "%s", "X-Axis");
this->XUnits = NULL;
......
......@@ -288,6 +288,14 @@ public:
vtkGetMacro(DrawZGridpolys,int);
vtkBooleanMacro(DrawZGridpolys,int);
// Description:
// Returns the text property for the title on an axis.
vtkTextProperty *GetTitleTextProperty(int);
// Description:
// Returns the text property for the labels on an axis.
vtkTextProperty *GetLabelTextProperty(int);
// Description:
// Get/Set axes actors properties.
void SetXAxesLinesProperty(vtkProperty *);
......@@ -338,14 +346,6 @@ public:
void SetLabelScaling(bool, int, int, int);
// Description:
// Returns the text property for the title on an axis.
vtkTextProperty *GetTitleTextProperty(int);
// Description:
// Returns the text property for the labels on an axis.
vtkTextProperty *GetLabelTextProperty(int);
//! use textactor if val = 1 (2D) instead of follower (3D - val = 0) for title
void SetUse2DMode( int val );
//! return 1 if textactor is used
......@@ -446,6 +446,9 @@ protected:
double LabelScreenOffset;
double TitleScreenOffset;
vtkTextProperty* TitleTextProperty[3];
vtkTextProperty* LabelTextProperty[3];
vtkProperty *XAxesLinesProperty;
vtkProperty *YAxesLinesProperty;
vtkProperty *ZAxesLinesProperty;
......@@ -508,8 +511,6 @@ private:
double YAxisRange[2];
double ZAxisRange[2];
vtkTextProperty* TitleTextProperty[3];
vtkTextProperty* LabelTextProperty[3];
double LabelScale;
double TitleScale;
......
Supports Markdown
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