Fix solidify stroke node ignoring transforms applied before stroke node (#3683)
* fix: solidify_stroke node now applies transformations before calculating the stroke * Check for non-invertible transform Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Keavon Chambers <keavon@keavon.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
2f8ee1b1bf
commit
87739ff877
|
|
@ -1154,8 +1154,14 @@ async fn solidify_stroke(_: impl Ctx, content: Table<Vector>) -> Table<Vector> {
|
||||||
// 0.25 is balanced between performace and accuracy of the curve.
|
// 0.25 is balanced between performace and accuracy of the curve.
|
||||||
const STROKE_TOLERANCE: f64 = 0.25;
|
const STROKE_TOLERANCE: f64 = 0.25;
|
||||||
|
|
||||||
for path in bezpaths {
|
for mut path in bezpaths {
|
||||||
let solidified = kurbo::stroke(path, &stroke_style, &stroke_options, STROKE_TOLERANCE);
|
path.apply_affine(Affine::new(stroke.transform.to_cols_array()));
|
||||||
|
|
||||||
|
let mut solidified = kurbo::stroke(path, &stroke_style, &stroke_options, STROKE_TOLERANCE);
|
||||||
|
if stroke.transform.matrix2.determinant() != 0. {
|
||||||
|
solidified.apply_affine(Affine::new(stroke.transform.inverse().to_cols_array()));
|
||||||
|
}
|
||||||
|
|
||||||
result.append_bezpath(solidified);
|
result.append_bezpath(solidified);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue