Fix 'Regular Polygon' and 'Star' shapes incorrectly having cubic handles, not linear (#3606)

Fix shape nodes creating cubic-curved polylines
This commit is contained in:
Keavon Chambers
2026-01-06 20:58:08 -08:00
committed by GitHub
parent bd847034f3
commit 1b91198b28
13 changed files with 40 additions and 49 deletions
@@ -2155,7 +2155,7 @@ impl ShapeState {
if polygon.len() < 2 {
return (points_inside, segments_inside);
}
let polygon: Subpath<PointId> = Subpath::from_anchors_linear(polygon.to_vec(), true);
let polygon: Subpath<PointId> = Subpath::from_anchors(polygon.to_vec(), true);
Some(polygon)
} else {
None
@@ -452,7 +452,7 @@ impl SelectToolData {
if self.lasso_polygon.len() < 2 {
return Vec::new();
}
let polygon = Subpath::from_anchors_linear(self.lasso_polygon.clone(), true);
let polygon = Subpath::from_anchors(self.lasso_polygon.clone(), true);
document.intersect_polygon_no_artboards(polygon, viewport).collect()
}
@@ -460,7 +460,7 @@ impl SelectToolData {
if self.lasso_polygon.len() < 2 {
return false;
}
let polygon = Subpath::from_anchors_linear(self.lasso_polygon.clone(), true);
let polygon = Subpath::from_anchors(self.lasso_polygon.clone(), true);
document.is_layer_fully_inside_polygon(layer, viewport, polygon)
}