Commit 5dcad97
committed
vtkTextMapper: fix rendering of empty string
vtkTextMapper improperly renders empty strings. Instead of rendering nothing, as
expected for an empty string, a rectangle is rendered. The rectangle is visible
only when the text property's background is not completely transparent.
This commit fixes the problem at two levels: in vtkFreeTypeTools and in
vtkTextMapper.
vtkFreeTypeTools now checks for an empty string when rendering to an image.
Without this check, rendering an empty string results in the small rectangle.
vtkTextMapper::RenderOverlay() is updated to handle the case of an empty image.
This also serves as a revised solution to #15787:
http://www.vtk.org/Bug/view.php?id=15787
Fixes #16071:
http://www.vtk.org/Bug/view.php?id=160711 parent 75b256a commit 5dcad97
File tree
3 files changed
+30
-8
lines changed- Rendering
- Core
- FreeType
- Testing/Cxx
3 files changed
+30
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
398 | 397 | | |
399 | | - | |
400 | | - | |
| 398 | + | |
| 399 | + | |
401 | 400 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
175 | 188 | | |
176 | 189 | | |
177 | 190 | | |
| |||
193 | 206 | | |
194 | 207 | | |
195 | 208 | | |
| 209 | + | |
196 | 210 | | |
197 | 211 | | |
198 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1242 | 1250 | | |
1243 | 1251 | | |
1244 | 1252 | | |
| |||
0 commit comments