diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-18 23:02:05 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-20 14:37:02 -0500 |
commit | ec1a3157c1851dcb481f402ec25aa38fa9e7c51c (patch) | |
tree | 8f5deeb7c3a636a79106c0de4054d202368c64ac /svtools | |
parent | 6a3fb868b2b8af21f7b6140424b6f8377599a786 (diff) |
Better pixelization of dashed lines for screen rendering.
Now the dashed lines are evenly placed on screen. For now, horizontal lines
only. I'll work on vertical lines later.
Change-Id: I474e9c8214e5f079ea2cfca12b35381d8fcf2ae1
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index b77b737037ea..47012cd7a79c 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -586,6 +586,9 @@ void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, lo namespace svtools { +/** + * Dashing array must start with a line width and end with a blank width. + */ std::vector<double> GetDashing( sal_uInt16 nDashing ) { std::vector<double> aPattern; @@ -625,6 +628,13 @@ public: } +std::vector<double> GetLineDashing( sal_uInt16 nDashing, double fScale ) +{ + std::vector<double> aPattern = GetDashing(nDashing); + std::for_each(aPattern.begin(), aPattern.end(), ApplyScale(fScale)); + return aPattern; +} + basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, sal_uInt16 nDashing, double fScale ) { std::vector<double> aPattern = GetDashing(nDashing); |