Skip to content
GitLab
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
87f9baa6
Commit
87f9baa6
authored
Sep 12, 2016
by
Dan Lipsa
Browse files
Shift quad position with one pixel to fix multiLineText test.
parent
85812c7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
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
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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