diff options
author | Keith Curtis <keithcu@gmail.com> | 2013-12-20 19:27:10 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-12-20 19:45:38 +0100 |
commit | c63324e0fdcfcaa21f48bdbae289954eee5922aa (patch) | |
tree | ae1578313d0a365aa8877aeeefc8746d3d726f50 /vcl | |
parent | c3bd435387ffbc6ae3c5a4861ac419d0a7092807 (diff) |
hidpi: Nicer painting of the waved lines.
Change-Id: I8773b47967bc1aa8cf33b9a1edc4f826291d3554
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 99b09db99195..ce5a9e66c7d7 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -5306,6 +5306,18 @@ void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos, nWaveHeight = 3; nStartY++; nEndY++; + + if (mnDPIScaleFactor > 1) + { + nStartY++; //Shift down an additional pixel to create more visual separation. + nWaveHeight *= mnDPIScaleFactor; + + //5 pixels looks better than 6. + if (mnDPIScaleFactor == 2 && nWaveHeight == 6) + { + nWaveHeight = 5; + } + } } else if( nStyle == WAVE_SMALL ) { @@ -5316,13 +5328,13 @@ void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos, else // WAVE_FLAT nWaveHeight = 1; - // #109280# make sure the waveline does not exceed the descent to avoid paint problems - ImplFontEntry* pFontEntry = mpFontEntry; - if( nWaveHeight > pFontEntry->maMetric.mnWUnderlineSize ) - nWaveHeight = pFontEntry->maMetric.mnWUnderlineSize; + // #109280# make sure the waveline does not exceed the descent to avoid paint problems + ImplFontEntry* pFontEntry = mpFontEntry; + if( nWaveHeight > pFontEntry->maMetric.mnWUnderlineSize ) + nWaveHeight = pFontEntry->maMetric.mnWUnderlineSize; ImplDrawWaveLine(nStartX, nStartY, 0, 0, - nEndX-nStartX, nWaveHeight * mnDPIScaleFactor, + nEndX-nStartX, nWaveHeight, mnDPIScaleFactor, nOrientation, GetLineColor()); if( mpAlphaVDev ) |