Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
72fda524
Commit
72fda524
authored
Nov 15, 2011
by
Philippe Pébay
Browse files
Adding variables and methods for title and label texts
Change-Id: Ibdc99b8c0fea17ddf87e214a51235890d8744d7d
parent
5e011eee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Hybrid/vtkCubeAxesActor.cxx
View file @
72fda524
...
@@ -46,6 +46,18 @@ vtkCubeAxesActor::vtkCubeAxesActor() : vtkActor()
...
@@ -46,6 +46,18 @@ vtkCubeAxesActor::vtkCubeAxesActor() : vtkActor()
this
->
FlyMode
=
VTK_FLY_CLOSEST_TRIAD
;
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
// Axis lines
this
->
XAxesLinesProperty
=
vtkProperty
::
New
();
this
->
XAxesLinesProperty
=
vtkProperty
::
New
();
this
->
YAxesLinesProperty
=
vtkProperty
::
New
();
this
->
YAxesLinesProperty
=
vtkProperty
::
New
();
...
@@ -136,17 +148,6 @@ vtkCubeAxesActor::vtkCubeAxesActor() : vtkActor()
...
@@ -136,17 +148,6 @@ vtkCubeAxesActor::vtkCubeAxesActor() : vtkActor()
this
->
ZAxes
[
i
]
->
GetTitleActor
()
->
SetScreenOffset
(
this
->
TitleScreenOffset
);
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
];
this
->
XTitle
=
new
char
[
7
];
sprintf
(
this
->
XTitle
,
"%s"
,
"X-Axis"
);
sprintf
(
this
->
XTitle
,
"%s"
,
"X-Axis"
);
this
->
XUnits
=
NULL
;
this
->
XUnits
=
NULL
;
...
...
Hybrid/vtkCubeAxesActor.h
View file @
72fda524
...
@@ -288,6 +288,14 @@ public:
...
@@ -288,6 +288,14 @@ public:
vtkGetMacro
(
DrawZGridpolys
,
int
);
vtkGetMacro
(
DrawZGridpolys
,
int
);
vtkBooleanMacro
(
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:
// Description:
// Get/Set axes actors properties.
// Get/Set axes actors properties.
void
SetXAxesLinesProperty
(
vtkProperty
*
);
void
SetXAxesLinesProperty
(
vtkProperty
*
);
...
@@ -338,14 +346,6 @@ public:
...
@@ -338,14 +346,6 @@ public:
void
SetLabelScaling
(
bool
,
int
,
int
,
int
);
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
//! use textactor if val = 1 (2D) instead of follower (3D - val = 0) for title
void
SetUse2DMode
(
int
val
);
void
SetUse2DMode
(
int
val
);
//! return 1 if textactor is used
//! return 1 if textactor is used
...
@@ -446,6 +446,9 @@ protected:
...
@@ -446,6 +446,9 @@ protected:
double
LabelScreenOffset
;
double
LabelScreenOffset
;
double
TitleScreenOffset
;
double
TitleScreenOffset
;
vtkTextProperty
*
TitleTextProperty
[
3
];
vtkTextProperty
*
LabelTextProperty
[
3
];
vtkProperty
*
XAxesLinesProperty
;
vtkProperty
*
XAxesLinesProperty
;
vtkProperty
*
YAxesLinesProperty
;
vtkProperty
*
YAxesLinesProperty
;
vtkProperty
*
ZAxesLinesProperty
;
vtkProperty
*
ZAxesLinesProperty
;
...
@@ -508,8 +511,6 @@ private:
...
@@ -508,8 +511,6 @@ private:
double
YAxisRange
[
2
];
double
YAxisRange
[
2
];
double
ZAxisRange
[
2
];
double
ZAxisRange
[
2
];
vtkTextProperty
*
TitleTextProperty
[
3
];
vtkTextProperty
*
LabelTextProperty
[
3
];
double
LabelScale
;
double
LabelScale
;
double
TitleScale
;
double
TitleScale
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment