summaryrefslogtreecommitdiff
path: root/udkapi
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-04-18 16:53:48 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-04-18 19:06:39 +0000
commit422f10c5d7ebe6f4b778636c9c1eb6dbdf708a27 (patch)
tree48cc1010c22ba6113fc70ae79ef6ed086331c981 /udkapi
parent6a92ada1f624b3d37976845517595e15ed5a73f6 (diff)
tdf#99315 VclPixelProcessor2D: fix double border line width
Regression from commit 2c91cb08d65cd35fa8ef6eaca3677aa82fb58cbe (better drawing support for borders of different width, fdo#33634, 2012-04-04), the problem is that previously the width of inner/outer double border lines got rounded to integer values quite early, but after the commit they are kept at a double precision for much longer, which needs pixel correction in VclPixelProcessor2D. Example: if the border with is 1.47, and the line gets moved by 0.2 pixels, then the inner and outer edge of the line will be 0.2 and 1.67, which gets rounded to 0 -> 2 in the pixel processor. Previously the input was rounded to 1, so moving by 0.2 resulted in 0.2 -> 1.2, which got rounded to 0 -> 1. The result is that sometimes the line width is 1 pixel wider than expected. Fix the problem by allowing VclPixelProcessor2D to request pixel correction from BorderLinePrimitive2D. It wouldn't be possible to do pixel correction only in VclPixelProcessor2D, as it has no idea what to correct: it only gets polygons, so it has no idea if e.g. the top of a polygon is the outer edge of a top border line or an inner edge of a bottom border line. Change-Id: I1971f3a952fbcdc598ab46c659e12d976c13cbe6 Reviewed-on: https://gerrit.libreoffice.org/24221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'udkapi')
0 files changed, 0 insertions, 0 deletions