Skip to content

Fix: CGAffineTransformIsIdentity checks for the identity, not any diagonal transform - #22

Merged
fredkiefer merged 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/cgaffinetransform-isidentity
Jul 25, 2026
Merged

Fix: CGAffineTransformIsIdentity checks for the identity, not any diagonal transform#22
fredkiefer merged 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/cgaffinetransform-isidentity

Conversation

@DTW-Thalion

@DTW-Thalion DTW-Thalion commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

CGAffineTransformIsIdentity tested that the diagonal was non-zero rather than that it was one, so it returned true for any transform with zero off-diagonal and translation: a pure scale such as CGAffineTransformMakeScale(2, 3) was reported as the identity. Compare each component against the identity value instead.

This makes the hopeful assertion in the CGAffineTransform tests pass. The test is in #21, which should be merged first. Checked against Apple CoreGraphics on a macOS runner.

@fredkiefer
fredkiefer merged commit 1368586 into gnustep:master Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants