Skip to content

The img32 transform convention is reversed with regard to SVG #82

Description

@AngusJohnson
          I see, and this is because the img32 transform convention is reversed to SVG sequence:

Your code (matrixRotate(); matrixScale()) is equivalent with: svgScale(); svgRotate();
SVG adds systems from left (parent) to right (child) to produce the same current matrix,
Your example corresponds to my extraction method (M = Z2 * Q).
So Z2 would deliver the userdefined scalefactor (sy = 1),
Extraction method (M = Q * Z) delivers the visual (sy = 2), which is Ok as well.

svgRotate() with current code would be:

procedure matrix_addLocalRotate( var matrix: TMatrixD; angle: double);
var mat: TMatrixD;
begin
  mat := identityMatrix;
  MatrixRotate( mat, NullPointD, angle);
  matrix := matrixMultiply( matrix, mat);
end;

Originally posted by @tomwiel in #70 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions