Add AdjustX method to basegfx::B2DPoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everybody,

Recently for GSoC I have been looking into resolving
"Use floating point for glyph positioning in VCL"

This involves changing the types of variables from tools::Point to basegfx::B2DPoint.
tools::Point has a method called AdjustX(long nHorzMove), which adds nHorzMove to X:

basegfx::B2DPoint 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 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)
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

  Powered by Linux