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


On Monday 04 of November 2019, Thorsten Behrens wrote:
Luboš Luňák wrote:
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?

Yes, essentially all graphics systems fill polygons like that
(including 3D ones). The reason is that otherwise you cannot render
pixel-perfect adjacent polygons without occasional overlap (especially
for non-straight connecting lines).

So really drawRect() is the odd one out, as Caolan suggested.

...and now you know why the code is so littered with this +1/-1
corrections for rectangles. The (now gone) software renderer in
basebmp had some comments about those subtleties, and some explicit
adjustments in the svp backend layer above.

 I see. That's really non-obvious (and the usual pathetic style of VCL's 
documentation doesn't help either), but it kind of makes sense, so I'll make 
Skia do the same and add a note to VCL backendtest pointing to this for 
whoever will feel like cleaning that mess up somehow.

-- 
 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.