improvements on ellipticalquadrant in enhanced path of custom shape
Noel Grandin
noelgrandin at gmail.com
Sun Dec 9 06:42:35 UTC 2018
On Sat, 8 Dec 2018 at 20:25, Regina Henschel <rb.henschel at t-online.de>
wrote:
> Problem A
> The current implementation has a method GetPoint, which returns a
> tools::Point; and such has integer coordinates. This introduces
>
>
I would say you should change GetPoint() to return a basegfx::B2Point. You
can't have two methods with the same name with different return types, and
this is a place where it clearly should be returning a more accurate result.
> Problem B
> to createPolygonFromEllipseSegment to allow generating of
> counter-clockwise arcs. Which way to go?
>
> You should add a parameter here. Either a boolean or an enum param,
something like 'enum class Direction { Clockwise, CounterClockwise }'
>
> Problem C
> the path is ill-structured and the first parameter point is consumed by
> moveTo? Keep the direction or toggle it?
>
> With ill-structured data, I would say that you should just 'not crash' and
error out at the earlier opportunity. There is no need to try doing
something sensible with such data unless necessary for some kind of
compaibility.
> Problem D
> How to make a unit test for such patches
> (https://gerrit.libreoffice.org/#/c/64704/1 is another one)? It would
> need to compare a bad rendering with a correct one and it would need to
>
>
For this kind of thing, one approach is to query the output
programmatically to see that it is correct. Other times we dump the output
using dumpAsXml() and query the output using XPath.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20181209/ee07e2b8/attachment.html>
More information about the LibreOffice
mailing list