Commit vtk-type.patch

This commit is contained in:
Orion Poplawski 2015-01-08 16:51:27 -07:00
parent 44c7e19891
commit 4ed6677edf

23
vtk-type.patch Normal file
View File

@ -0,0 +1,23 @@
diff -up VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx.type VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx
--- VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx.type 2014-01-22 08:55:41.000000000 -0700
+++ VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx 2015-01-08 15:00:40.492667074 -0700
@@ -1186,7 +1186,7 @@ bool vtkFreeTypeTools::CalculateBounding
if (bitmap)
{
metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent);
- metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)),
+ metaData.descent = std::min(-(static_cast<int>(bitmap->rows) - (bitmapGlyph->top - 1)),
metaData.descent);
}
++heightString;
@@ -1951,8 +1951,8 @@ void vtkFreeTypeTools::GetLineMetrics(T
if (bitmap)
{
bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left);
- bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width);
- bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows);
+ bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + static_cast<int>(bitmap->width));
+ bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast<int>(bitmap->rows));
bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1);
}
else