Re: RFC: Sane rectangle class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread 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@xxxxxxxxxxxxx
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux