Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
VTK
VTK
Commits
87f9baa6
Commit
87f9baa6
authored
Sep 12, 2016
by
Dan Lipsa
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shift quad position with one pixel to fix multiLineText test.
parent
85812c7b
Pipeline
#26711
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Rendering/Core/vtkTextMapper.cxx
Rendering/Core/vtkTextMapper.cxx
+7
-5
No files found.
Rendering/Core/vtkTextMapper.cxx
View file @
87f9baa6
...
...
@@ -505,17 +505,19 @@ void vtkTextMapper::UpdateQuad(vtkActor2D *actor, int dpi)
text_bbox
[
0
]
=
0
;
text_bbox
[
2
]
=
0
;
}
// adjust the quad so that the anchor point and a point with the same
// coordinates fall on the same pixel.
double
shiftPixel
=
1
;
double
x
=
static_cast
<
double
>
(
text_bbox
[
0
]);
double
y
=
static_cast
<
double
>
(
text_bbox
[
2
]);
double
w
=
static_cast
<
double
>
(
this
->
TextDims
[
0
]);
double
h
=
static_cast
<
double
>
(
this
->
TextDims
[
1
]);
this
->
Points
->
Reset
();
this
->
Points
->
InsertNextPoint
(
x
,
y
,
0.
);
this
->
Points
->
InsertNextPoint
(
x
,
y
+
h
,
0.
);
this
->
Points
->
InsertNextPoint
(
x
+
w
,
y
+
h
,
0.
);
this
->
Points
->
InsertNextPoint
(
x
+
w
,
y
,
0.
);
this
->
Points
->
InsertNextPoint
(
x
-
shiftPixel
,
y
-
shiftPixel
,
0.
);
this
->
Points
->
InsertNextPoint
(
x
-
shiftPixel
,
y
+
h
-
shiftPixel
,
0.
);
this
->
Points
->
InsertNextPoint
(
x
+
w
-
shiftPixel
,
y
+
h
-
shiftPixel
,
0.
);
this
->
Points
->
InsertNextPoint
(
x
+
w
-
shiftPixel
,
y
-
shiftPixel
,
0.
);
this
->
CoordsTime
.
Modified
();
}
}
...
...
Dan Lipsa
@danlipsa
mentioned in commit
54b4469c
·
Sep 21, 2016
mentioned in commit
54b4469c
mentioned in commit 54b4469ca9c6f19bc76568553ce51b50e1bce09e
Toggle commit list
Write
Preview
Markdown
is supported
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