Tools module geometry classes

Miklos Vajna vmiklos at collabora.com
Mon Jun 27 06:51:57 UTC 2022


Hi Chris,

On Mon, Jun 13, 2022 at 01:03:30PM +1000, Chris Sherlock <chris.sherlock79 at gmail.com> wrote:
> LibreOffice has seperate implementations for points, lines, rectangle, polygons and polypolygons - one is in the tools module, and the other is in the basegfx module.
> 
> Are there any plans for deprecating the usage of the tools geometry primitives? I understand it will be needed for deserialising some legacy svm files, but is the intention to ever start replacing the tools primitives with the basegfx primitives?

The trouble with e.g. tools::Rectangle is that it can have both a closed
or a half-open interval, and you need to read the surrounding code to
understand which mode is in use. basegfx::B2IRange is explicitly closed.

So it would help readability to go with basegfx::B2IRange everywhere,
but it's not an easy hack to do such conversions.

Regards,

Miklos


More information about the LibreOffice mailing list