summaryrefslogtreecommitdiff
path: root/vcl/headless/SvpGraphicsBackend.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/headless/SvpGraphicsBackend.cxx')
-rw-r--r--vcl/headless/SvpGraphicsBackend.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/headless/SvpGraphicsBackend.cxx b/vcl/headless/SvpGraphicsBackend.cxx
index f564b7e78958..86b804c47146 100644
--- a/vcl/headless/SvpGraphicsBackend.cxx
+++ b/vcl/headless/SvpGraphicsBackend.cxx
@@ -247,6 +247,12 @@ bool SvpGraphicsBackend::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToD
return true;
}
+ // don't bother trying to draw stuff which is effectively invisible
+ basegfx::B2DRange aPolygonRange = rPolyPolygon.getB2DRange();
+ aPolygonRange.transform(rObjectToDevice);
+ if (aPolygonRange.getWidth() < 0.1 || aPolygonRange.getHeight() < 0.1)
+ return true;
+
cairo_t* cr = m_rCairoCommon.getCairoContext(true, getAntiAlias());
m_rCairoCommon.clipRegion(cr);