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


On Friday 20 of March 2020, Thorsten Behrens wrote:
Luboš Luňák wrote:
One question: any reason not to tweak the basegfx classes to fit this
model?

 Looking at those classes, I think their API serves some other
purpose than "simple point/size/rectangle", so the closest to
tweaking them I see is wrapping them in a completely new API.

No, not from what I can tell. Where to you see that other purpose?

 To put it more bluntly, I think the B2IRectangle API is bad. A glaring 
example is the class hierarchy, which is needlessly complicated and confusing 
for the use case of "simply a rectangle" (so a rectangle is actually a range, 
a size is actually a vector, and both point and vector are actually a kind of 
tuple ... huh?). It also causes technical problems, as mistakes such 
as 'B2IRectangle( B2ISize( 0, 0 ), B2IPoint( 0, 0 ))' will compile without 
problems.

 Replacing one error-prone API with another error-prone API doesn't solve 
anything.

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