diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-08-31 10:09:27 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-11-09 18:42:28 +0100 |
commit | eef2768482037d3eb161a5f3d7dd1bc46ccf5ff9 (patch) | |
tree | d81ad2c7261ab2ac9fda998cdada167b8d87c80a /vcl | |
parent | 8d1b99f2fe9d41462614ad5a33dbdcb612fc08b0 (diff) |
custom widgets: enable anti-aliasing when drawing widgets
Change-Id: I050d8534cacdee63109158dbc150d9d13b43fe5e
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/CustomWidgetDraw.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx index ab4dec19b44e..ef1a0a053033 100644 --- a/vcl/headless/CustomWidgetDraw.cxx +++ b/vcl/headless/CustomWidgetDraw.cxx @@ -62,7 +62,10 @@ bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart, if (s_pWidgetImplementation == nullptr) return false; - cairo_t* pCairoContext = m_rGraphics.getCairoContext(true); + bool bOldAA = m_rGraphics.getAntiAliasB2DDraw(); + m_rGraphics.setAntiAliasB2DDraw(true); + + cairo_t* pCairoContext = m_rGraphics.getCairoContext(false); m_rGraphics.clipRegion(pCairoContext); cairo_translate(pCairoContext, rControlRegion.Left(), rControlRegion.Top()); @@ -272,6 +275,8 @@ bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart, m_rGraphics.releaseCairoContext(pCairoContext, true, aExtents); + m_rGraphics.setAntiAliasB2DDraw(bOldAA); + return bOK; } |