diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-25 10:45:56 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-07-29 01:55:53 +0000 |
commit | f5fd2c66f6d994761fa7d5f744f2f1bdd6a84cba (patch) | |
tree | d14cdac5d4e291e5d558c0454bdabaaa56946c5d /vcl/headless | |
parent | b4e3c29f8aab725b71e76a4b6387134cf6241d11 (diff) |
set antialias once when context is created
Change-Id: Id36e716253768321e1ddfb977a22470c6b694147
Reviewed-on: https://gerrit.libreoffice.org/27510
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpgdi.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index af26bd13bbc5..ed8cdc656848 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -686,10 +686,7 @@ void SvpSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) cairo_t* cr = getCairoContext(false); clipRegion(cr); - bool bAA = getAntiAliasB2DDraw(); - - cairo_set_antialias(cr, bAA ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE); - AddPolygonToPath(cr, aPoly, aPoly.isClosed(), !bAA, true); + AddPolygonToPath(cr, aPoly, aPoly.isClosed(), !getAntiAliasB2DDraw(), true); applyColor(cr, m_aLineColor); @@ -771,7 +768,6 @@ bool SvpSalGraphics::drawPolyLine( cairo_set_line_width(cr, rLineWidths.getX()); cairo_set_miter_limit(cr, fMiterLimit); - cairo_set_antialias(cr, getAntiAliasB2DDraw() ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE); basegfx::B2DRange extents(0, 0, 0, 0); @@ -1288,6 +1284,7 @@ cairo_t* SvpSalGraphics::getCairoContext(bool bXorModeAllowed) const cr = cairo_create(m_pSurface); cairo_set_line_width(cr, 1); cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD); + cairo_set_antialias(cr, getAntiAliasB2DDraw() ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE); if (m_ePaintMode == INVERT) cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE); else |