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


Hi Regina,

On Wed, Apr 10, 2019 at 02:41:17PM +0200, Regina Henschel <rb.henschel@t-online.de> wrote:
The needed calculation depends on the shape type, the handle and the
parameter ( X, Y, Radius, Angle) of the handle. Different handles of a shape
can need different calculations. On the other hand, different shapes can use
the same calculation for their handles, e.g all those, which are correct
with the current implementation.

I might be wrong, but I would expect that the evaluation of the formulas
don't depend on the shape type. If it does, it feels we don't understand
the general rule, so we work the problem around with evaluating a
formula in different ways for different shape types.

Would that be OK? If yes, which are suitable C++ tools to do that and where
should the parts be placed?

Sure, if special-casing on the shape type improves the situation, then
it's better than nothing. I would keep it simple: just create an enum
with the different cases, and then you can have a switch to handle each.
If the function gets large, extract the handling of complicated cases to
their own functions.

Regards,

Miklos

Attachment: signature.asc
Description: Digital 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.