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:
MotherBoardMage 2026-02-16 02:02:22 +05:30 committed by GitHub
parent 2f8ee1b1bf
commit 87739ff877
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -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.
const STROKE_TOLERANCE: f64 = 0.25;
for path in bezpaths {
let solidified = kurbo::stroke(path, &stroke_style, &stroke_options, STROKE_TOLERANCE);
for mut path in bezpaths {
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);
}