summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-06-28 00:03:19 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-07-01 04:49:07 +0200
commitbfc19d77cb8db445f1c6123347c19a4c0c6a6cf8 (patch)
treed5deaaa44975838dec487d977d064c37080cf40e /drawinglayer
parent45a2eecfee472d8822130a90999b46ad371dee95 (diff)
Improve the looks of a wave line by draw it with bezier curves
This adds drawing the wave line (typically used to underline the wrongly spelled words) with bezier curves. Previously the wave lines were drawn with drawing pixels, which didn't look that good, especially on HiDPI display, so the looks of wave lines now is therefor much better. The creation of the wave line as a polygon has been added to the basegfx module, so it can be reused if needed. In addition, everytime we draw the waveline, we have to enable antialiasing, to have a much better quality of the curves. By default the antialiasing is disabled for some reason. This also adds ScopedStates.hxx file which currently includes ScopedAntialiasing, which sets the antialiasing to a certain state for the time the object is in scope, and then sets it back to the original state. Change-Id: I4b866fc5d69725eb7f6f78a1acf4176b1205aa73 Reviewed-on: https://gerrit.libreoffice.org/74810 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/helperwrongspellrenderer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
index d690a77b6728..c359b3485bc6 100644
--- a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
+++ b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
@@ -22,10 +22,9 @@
#include <tools/gen.hxx>
#include <vcl/outdev.hxx>
#include <basegfx/color/bcolormodifier.hxx>
+#include <vcl/outdev/ScopedStates.hxx>
-
-using namespace com::sun::star;
-
+using namespace css;
namespace drawinglayer
{
@@ -55,6 +54,7 @@ namespace drawinglayer
const basegfx::BColor aProcessedColor(rBColorModifierStack.getModifiedColor(rWrongSpellCandidate.getColor()));
const bool bMapModeEnabledState(rOutputDevice.IsMapModeEnabled());
+ vcl::ScopedAntialiasing a(rOutputDevice, true);
rOutputDevice.EnableMapMode(false);
rOutputDevice.SetLineColor(Color(aProcessedColor));
rOutputDevice.SetFillColor();