Skip to content
  • Max Smolens's avatar
    vtkTextMapper: fix rendering of empty string · 5dcad978
    Max Smolens authored
    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=16071
    5dcad978