Port all remaining Subpath producers to BezPath and delete the legacy subpath module (#4457)

* Port all remaining Subpath producers to BezPath and delete the legacy subpath module

* Reset contour state at each MoveTo so an open contour's segments don't leak into the next region

* Give the polygon and star constructors a true center and radius instead of compensated arguments
This commit is contained in:
Keavon Chambers
2026-08-18 15:28:58 -07:00
committed by GitHub
parent 8f1b2bed5f
commit e3b968f7e2
43 changed files with 961 additions and 1291 deletions
@@ -1,7 +1,8 @@
use glam::DVec2;
use graphic_types::Vector;
use std::collections::VecDeque;
use vector_types::subpath;
use vector_types::vector::VectorExt;
use vector_types::vector::algorithms::shapes;
pub fn merge_qr_squares(qr_code: &qrcodegen::QrCode) -> Vector {
let mut vector = Vector::default();
@@ -106,7 +107,7 @@ pub fn merge_qr_squares(qr_code: &qrcodegen::QrCode) -> Vector {
}
if !simplified.is_empty() {
vector.append_subpath(subpath::Subpath::from_anchors(simplified, true), false);
vector.append_bezpath(shapes::polyline_bezpath(simplified, true));
}
}
}