summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-01-11 10:10:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-01-18 11:34:06 +0000
commit5afd43915c763e08584a0785d816425ca7a1573c (patch)
tree17fd067e6e5be43a561449d90c98f1cc3a4acf2b /vcl
parent31092460c3c5427f55cfcf550d2b46b3ac225841 (diff)
svp: draw polygons with cairo where possible
Change-Id: Ieb4cb175c46ee965c84705a2e2c1d4a4fef2a4e6
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/svpgdi.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 2aae05bf4950..01c37c23eb92 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -826,8 +826,20 @@ void SvpSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry )
dbgOut( m_aDevice );
}
-void SvpSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry )
+void SvpSalGraphics::drawPolygon(sal_uInt32 nPoints, const SalPoint* pPtAry)
{
+ if (m_aDrawMode != basebmp::DrawMode::XOR)
+ {
+ basegfx::B2DPolygon aPoly;
+ aPoly.append(basegfx::B2DPoint(pPtAry->mnX, pPtAry->mnY), nPoints);
+ for (sal_uInt32 i = 1; i < nPoints; ++i)
+ aPoly.setB2DPoint(i, basegfx::B2DPoint(pPtAry[i].mnX, pPtAry[i].mnY));
+ drawPolyPolygon(basegfx::B2DPolyPolygon(aPoly), 0);
+ return;
+ }
+
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolygon case");
+
if ((m_bUseLineColor || m_bUseFillColor) && nPoints && m_aDevice)
{
basegfx::B2DPolygon aPoly;