summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <armin.le.grand@me.com>2021-04-27 11:09:32 +0200
committerAndras Timar <andras.timar@collabora.com>2021-05-03 12:37:37 +0200
commitf90fcf1b8868548de5253fc0297550c2d0452d74 (patch)
tree73945ce783dd2b1a2707860fc7ee56fc7bc9ba70 /sw
parent31c95393641bcd798ea068889d4061a8dc445a55 (diff)
tdf#141761 Enhance PrintDialog Preview for FormControls
The display quality of the Preview is pretty ugly when FormControls are used. I made a deep-dive why this happens, and in principle the reason is the Mteafile::Scale used below. Since Metafile actions are integer, that floating point scale leads to rounduing errors that make the lines painting the FormControls disappear in the surrounding ClipRegions. That Scale cannot be avoided since the Metafile contains it's own SetMapMode commands which *will* be executed on ::Play, so the ::Scale is the only possibility fr Metafile currently: Giving a Size as parameter in ::Play will *not* work due to the relativeMapMode that gets created will fail on ::SetMapMode actions in the Metafile - and FormControls DO use ::SetMapMode(MapPixel). This can only be solved better in the future using Primitives which would allow any scale by embedding to a Transformation, but that would be a bigger rework. Until then, use this little 'trick' to improve qulatity. It uses the fact to empirically having tested that the quality gets really bad for FormControls starting by a scale factor smaller than 0.2 - that makes the ClipRegion overlap start. So - for now - try not to go below that. Change-Id: I540de602634c6afa697b5659d69c34159c22075c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114704 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Tested-by: Armin Le Grand <Armin.Le.Grand@me.com> (cherry picked from commit 4722ad2cf3f2b91c217e3548f811f2972f2aa60c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114715 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sw')
0 files changed, 0 insertions, 0 deletions