Skip to content

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

@AngusJohnson

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)

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