Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index



 Hello,

 if I run "SAL_USE_VCLPLUGIN=<plugin> bin/run visualbackendtest" and hit Space 
once to get to the screen that shows filled rectangles (and diamonds), the 
second and third rectangles miss their right and bottom edges. The first one 
is correct, and it is because that one uses drawRect(), while the other two 
use draw(Poly)Polygon(). And this happens only if line color is unset, so 
that it's only filled with the fill color.

 What I find really strange is that this happens with whatever VCL plugin and 
drawing system I use, GDI, X11, Cairo, Skia, OpenGL. And I've checked and we 
pass the polygons correctly to the underlying drawing system and they all do 
not draw the right-most and bottom-most line of pixels.

 Is this some kind of a strange rule that I'm not aware of? Does somebody know 
a good reason why all graphics libraries would do this?

 Also, does anyone see a problem if I fixed this by forcing line color to the 
fill color if unset? The rectangles then would have the expected size, but 
that's assuming that there is not the expectation that the border lines would 
be missing. This also means that the left-most and top-most lines of pixels 
would be drawn twice, but we already do that if line color is set, so 
presumably that's not a problem in practice.

-- 
 Luboš Luňák
 l.lunak@collabora.com

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.