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


Hi everybody,

Recently for GSoC I have been looking into resolving
"Use floating point for glyph positioning in VCL" 
<https://bugs.documentfoundation.org/show_bug.cgi?id=103322>

This involves changing the types of variables from tools::Point to basegfx::B2DPoint.
tools::Point <https://docs.libreoffice.org/tools/html/classPoint.html> has a method called 
AdjustX(long nHorzMove), which adds nHorzMove to X:

basegfx::B2DPoint <https://docs.libreoffice.org/basegfx/html/classbasegfx_1_1B2DPoint.html> does 
not have such a method. So calls to AdjustX(nHorzMove) are
being replaced by something like setX(getX() + nHorzMove).

It works fine of course but I think AdjustX looks cleaner and it feels like a step
backwards when moving from tools::Point to basegfx::B2DPoint.

An OpenGrok search <https://opengrok.libreoffice.org/search?project=core&refs=AdjustX> for AdjustX 
reveals it is used frequently in the code-base,
which suggests it is a method which developers have found useful in the past.

If it is agreed that we should add such a method I would be happy to implement it.
Also for consistency we might want to add a similar method to other classes in
basegfx such as B2IPoint.

With many thanks,
Alexander Farrow (IRC: Alexander Farrow)

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.