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


Hey Luboš,

Luboš Luňák wrote:
 So, yeah, I'm proposing a new standard Rectangle class (and I know
xkcd, and I'm still serious). My idea is roughly that there will be
some tools::NewRectangle (or whatever usable name), it will be more
or less like tools::Rectangle, but it'll make things clear [...]

Please don't put anything into tools anymore. Tools is a delete-only
module, and needs to die.

for example:
- internal representation will be whatever sane thing will work, e.g.
  x,y,width,height , and it won't matter for the API
- empty rectangle is simply width == 0 || height == 0
- no (int, int, int, int) ctor
- we can try without bottom and right functions, or we can define what they
  mean and be consistent about it (no idea, no preference)
- there will be things like FromOpenRectangle() to allow converting from/to
  tools::Rectangle, making it hopefully easier to gradually move over

All sounds sane.

One question: any reason not to tweak the basegfx classes to fit this
model? That would avoid the N-th implementation issue, shouldn't be
too onerous (given the low number of client usages), and answers
Noel's question around underlying value type.

Cheers,

-- Thorsten

Attachment: signature.asc
Description: PGP signature


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.