https://bugs.documentfoundation.org/show_bug.cgi?id=147884

            Bug ID: 147884
           Summary: Revert deprecation of API service RotationDescriptor
           Product: LibreOffice
           Version: 7.4.0.0 alpha0+ Master
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: rb.hensc...@t-online.de

Created attachment 178765
  --> https://bugs.documentfoundation.org/attachment.cgi?id=178765&action=edit
Document contains macros to rotate a shape

Currently the service RotationDescriptor is deprecated with the hint to use the
Transformation property instead. But using the Transformationmatrix from the
shape is a huge effort, if you only want to rotate a shape around its center.

The attached file contains the macro "impl_zRotation" which uses the deprecated
service and the macro "impl_zRotationTransformation" which uses the property
Transformation instead. Even if you do not understand the details, you will see
how complicated a solution with property Transformation is.

The service RotationDescriptor works fine, only the Description in the API
documentation needs to be improved so that it is clear to the user, what he
gets.

The problem with property Transformation is, that you do not get the
transformed shape, when you apply the Transformation matrix to the shape in
unit size. The matrix which you get by property Transformation has a wrong sign
in the shear value.

Even if we add a new property for a mathematical correct Transformation matrix
(we should do that), rotation around shape center (as done by setting
RotateAngle of service RotationDescriptor) is cumbersome. You need to calculate
the shape center, apply a translation to origin, rotate, and translate back.
That are four matrix multiplication whereas with RotateAngle it is a single
assignment.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to