Open stoneyallen opened 11 months ago
Did you mean to set the scaling terms to zero in your transform matrix?
I saw this recently also when trying to fill/stroke a path with an invalid transform.
The error comes from canvas/mod.rs @ 312 in draw_path()
method due to the current transform not being invertable. Fix for error:
- let inverse = self.state.matrix.invert().unwrap();
+ let inverse = self.state.matrix.invert().unwrap_or_default();
Though it still won't draw anything, just won't throw error 😉
After executing the above statement, an error will be reported. When setTransform is deleted, the error will disappear.