This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 59
RFC: MatrixTrait::try_invert() #116
Comments
Seems reasonable and a good idea. |
federicomenaquintero
added a commit
to federicomenaquintero/cairo
that referenced
this issue
Mar 16, 2017
See gtk-rs#116 - we return a Result<Matrix, Status> with the result of cairo_matrix_invert().
federicomenaquintero
added a commit
to federicomenaquintero/cairo
that referenced
this issue
Mar 16, 2017
See gtk-rs#116 - we return a Result<Matrix, Status> with the result of cairo_matrix_invert().
federicomenaquintero
added a commit
to federicomenaquintero/cairo
that referenced
this issue
Jul 6, 2017
See gtk-rs#116 - we return a Result<Matrix, Status> with the result of cairo_matrix_invert().
This has been merged; closing. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I appreciate how MatrixTrait::invert() actually ensures that the matrix is invertible, and panics otherwise; it has caught a lot of bugs in librsvg.
Now, I need to know if a matrix is actually invertible, to validate user-supplied data (actually, transformations that come from an SVG file).
The quick-and-dirty way is to call ffi::cairo_matrix_invert() by hand and test the result.
A more idiomatic way could be to have this in MatrixTrait:
What do you think? I can submit a pull request for this if you like the API.
The text was updated successfully, but these errors were encountered: