Hi Regina,
It works in principle,
What does that mean ?!?
A: An empty constructed basegfx::B2DHomMatrix is on identity (no-op), so it is ideal to test if it
is used. Will even work when usages add-up to identity matrix whant means 'no change'. Yes, use
isIdentity() please.
B: You might calculate it, but it is not really needed. Since we rotate arouhd center (only) it is
sufficient to extract rotation and set it - we know it's around center. The rest of the shape
(svg:x/y/width/height) is the unrotated shape, so this is sufficient. It can be calculated to make
error-checks if wanted. It will have to be calculated when someone will use more of the
transformation later (or we do)
C: Not sure whant you mean here. Correcting the position means it's 'overdefined'. The
(svg:x/y/width/height) and back-calculating from transformation with (-translate, rotate,
translate) to rotate around center *should* always give the same center. If not, it is *not clear*
which definition is the correct one. This is the reason the transformation should *not* contain
positioning at all. The idea is: Apply (svg:x/y/width/height) first (pos and size), then apply
transformation to it (rotate, shear, mirror (scale-1)).
HTH!
-----Ursprüngliche Nachricht-----
Von: Regina Henschel [mailto:rb.henschel@t-online.de]
Gesendet: Friday, February 23, 2018 15:13
An: LO dev fdo <libreoffice@lists.freedesktop.org>
Cc: Armin Le Grand <Armin.LeGrand@extern.cib.de>
Betreff: Consider translation of transformation matrix of image rotation
Hi Armin, hi all,
this is about https://bugs.documentfoundation.org/show_bug.cgi?id=115590
and my proposal https://gerrit.libreoffice.org/#/c/50176/
It works in principle, but I'm not sure about some details:
A
It has a construction
basegfx::B2DHomMatrix aFullTransform;
with later on
if ( !aFullTransform.isIdentity() )
Should I use
basegfx::B2DHomMatrix aFullTransform;
bool bHasTransformation;
if ( bHasTransformation )
instead?
B
It has
if ( aTransformedCenterPosition != aCenterPosition ) Is this check useful, or should I
calculate the correction always, although the result might be the original value?
C
Is this the correct place at all to correct the position?
Kind regards
Regina
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.