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
Michael Migliore
VTK
Commits
ff7f87a1
Commit
ff7f87a1
authored
May 04, 2018
by
Alessandro Genova
Browse files
Increase the font size of the axis label
parent
3c6be725
Changes
3
Hide whitespace changes
Inline
Side-by-side
Charts/Core/Testing/Cxx/CMakeLists.txt
View file @
ff7f87a1
set
(
TestAxes2_ARGS
-E 0
)
set
(
TestChartUnicode_ARGS
DATA{../Data/Fonts/DejaVuSans.ttf}
-E 25
...
...
Charts/Core/Testing/Cxx/TestAxes2.cxx
View file @
ff7f87a1
...
...
@@ -23,6 +23,7 @@
#include
"vtkStringArray.h"
#include
"vtkRenderWindow.h"
#include
"vtkRenderWindowInteractor.h"
#include
"vtkTextProperty.h"
#include
<vector>
...
...
@@ -33,28 +34,28 @@ int TestAxes2(int , char * [])
// Set up a 2D scene, add an XY chart to it
vtkNew
<
vtkContextView
>
view
;
view
->
GetRenderWindow
()
->
SetSize
(
1
00
,
1
00
);
view
->
GetRenderWindow
()
->
SetSize
(
2
00
,
2
00
);
vtkNew
<
vtkAxis
>
axisVertical
;
int
i
=
0
;
axisVertical
->
LogScaleOn
();
axisVertical
->
SetPoint1
(
vtkVector2f
(
9
0
,
8
));
axisVertical
->
SetPoint2
(
vtkVector2f
(
9
0
,
92
));
axisVertical
->
SetPoint1
(
vtkVector2f
(
18
0
,
16
));
axisVertical
->
SetPoint2
(
vtkVector2f
(
18
0
,
184
));
axisVertical
->
SetPosition
(
vtkAxis
::
LEFT
);
// Exercise some of the API in the axis API.
axisVertical
->
SetNotation
(
vtkAxis
::
SCIENTIFIC_NOTATION
);
axisVertical
->
SetPosition
(
vtkAxis
::
LEFT
);
axisVertical
->
SetPrecision
(
6
);
axisVertical
->
SetPrecision
(
0
);
axisVertical
->
SetRange
(
0.1
,
1000000.
);
axisVertical
->
SetRangeLabelsVisible
(
true
);
//
axisVertical->
S
et
RangeLabelFormat("%3.1f"
);
axisVertical
->
G
et
LabelProperties
()
->
SetFontSize
(
24
);
view
->
GetScene
()
->
AddItem
(
axisVertical
);
axisVertical
->
Update
();
axisVertical
->
Update
();
// Let's create a few axes, and place them on the scene.
...
...
Charts/Core/Testing/Data/Baseline/TestAxes2.png.md5
View file @
ff7f87a1
b92f77a5d210f8bec5ee915c6da116a6
cf56fa726e644c73d22a57d9e11c74c7
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