diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-08 13:22:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-09 08:42:27 +0000 |
commit | 0bf5254b00a21da3dd348a7155c2a40b8ae2d8fe (patch) | |
tree | ec96cd34fcc47867fcdaf6b3e371ec14c56133ed /vcl/headless | |
parent | b5699cd01b6a52906880c107bac6f3802ea7353d (diff) |
convert PaintMode to scoped enum
and drop unused INVERT enumerator
Change-Id: I6db12ff76a5515bcb4691403b8fb380f9d74c1c9
Reviewed-on: https://gerrit.libreoffice.org/34055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpgdi.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 191c5c654ec0..e6380808fc03 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -393,7 +393,7 @@ SvpSalGraphics::SvpSalGraphics() , m_fScale(1.0) , m_aLineColor(MAKE_SALCOLOR(0x00, 0x00, 0x00)) , m_aFillColor(MAKE_SALCOLOR(0xFF, 0xFF, 0XFF)) - , m_ePaintMode(OVERPAINT) + , m_ePaintMode(PaintMode::Over) , m_aTextRenderImpl(*this) { } @@ -462,7 +462,7 @@ void SvpSalGraphics::SetFillColor( SalColor nSalColor ) void SvpSalGraphics::SetXORMode(bool bSet ) { - m_ePaintMode = bSet ? XOR : OVERPAINT; + m_ePaintMode = bSet ? PaintMode::Xor : PaintMode::Over; } void SvpSalGraphics::SetROPLineColor( SalROPColor nROPColor ) @@ -1291,17 +1291,14 @@ cairo_t* SvpSalGraphics::createTmpCompatibleCairoContext() const cairo_t* SvpSalGraphics::getCairoContext(bool bXorModeAllowed) const { cairo_t* cr; - if (m_ePaintMode == XOR && bXorModeAllowed) + if (m_ePaintMode == PaintMode::Xor && bXorModeAllowed) cr = createTmpCompatibleCairoContext(); else 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 - cairo_set_operator(cr, CAIRO_OPERATOR_OVER); + cairo_set_operator(cr, CAIRO_OPERATOR_OVER); return cr; } @@ -1335,7 +1332,7 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons //For the most part we avoid the use of XOR these days, but there //are some edge cases where legacy stuff still supports it, so //emulate it (slowly) here. - if (m_ePaintMode == XOR && bXorModeAllowed) + if (m_ePaintMode == PaintMode::Xor && bXorModeAllowed) { cairo_surface_t* target_surface = m_pSurface; if (cairo_surface_get_type(target_surface) != CAIRO_SURFACE_TYPE_IMAGE) |