-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of CGAffineTransform
#428
Comments
Could we just add a |
I don't see why not? Ideally we want some tests that prove it would help though. |
And tests that cover both low level stuff (the canonical meaning of "unit tests") and high level stuff are great. More tests on both sides is better 👍 |
To fully clarify, just making sure that High level snapshot tests would only be needed for transform modifiers, if we expect them to be impacted by this change. |
It looks like Note: I suspect Foundation's implementation of |
Is there anything available on bugs.swift.org or a radar for |
Is the implementation of the non-apple
CGAffineTransform
correct?Several things seem "off". For one, the implementation of
inverted()
simply negates the matrix's components. On other implementations, however, such as theFoundation
and SwiftWin32 ones, it's much more complex — calculating a determinant, examining if inversion is possible, etc. Furthermore,rotated(by:)
— despite claiming to rotate an existing transformation — ignores the translation components of the matrix (tx
andty
) and existing scaling and rotation adjustments.Perhaps, the current return value of
rotated(by:)
was intended to be appended toself
before being returned.If this is indeed incorrect, I'd be happy to submit a PR to fix it and add a test coverage — although tests in Tokamak seem to cover higher-level rendering behavior.
The text was updated successfully, but these errors were encountered: