vcl/source/gdi/gdimtf.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 0f02412d6baf9edb54c62856c52cebfa707291b2
Author: Caolán McNamara <[email protected]>
AuthorDate: Sat Aug 22 20:37:00 2020 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Sun Aug 23 15:46:51 2020 +0200
crashtesting avoid problematic scaling triggered by moz1545040-1.svg
Change-Id: I906891f8d01870bd13a98fc6720abb7ffaa9be1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101189
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 246b3c91f4de..22b516924b2b 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2782,6 +2782,10 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx,
BmpConversion eColorConve
{
// initialization seems to be complicated but is used to avoid rounding
errors
ScopedVclPtrInstance< VirtualDevice > aVDev;
+ // set EnableB2dDraw to tease the rendering down the code paths which use
B2DPolygon and
+ // avoid integer overflows on scaling tools::Polygon, e.g. moz1545040-1.svg
+ // note: this is similar to DocumentToGraphicRenderer::renderToGraphic
+ aVDev->SetAntialiasing(AntialiasingFlags::EnableB2dDraw |
aVDev->GetAntialiasing());
const Point aNullPt;
const Point aTLPix( aVDev->LogicToPixel( aNullPt, GetPrefMapMode() ) );
const Point aBRPix( aVDev->LogicToPixel( Point( GetPrefSize().Width()
- 1, GetPrefSize().Height() - 1 ), GetPrefMapMode() ) );
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits