Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 47a0133

Browse files
committed
Fixes stroke path geometry that can draw outside of path if the path ends at sharp turn
1 parent c5854a6 commit 47a0133

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

impeller/entity/geometry/stroke_path_geometry.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,15 +308,11 @@ StrokePathGeometry::CreateSolidStrokeVertices(
308308
// Generate contour geometry.
309309
for (size_t point_i = contour_start_point_i + 1;
310310
point_i < contour_end_point_i; point_i++) {
311-
// Generate line rect.
311+
// Generate vertical line to fill the stroke width at point_i - 1
312312
vtx.position = polyline.points[point_i - 1] + offset;
313313
vtx_builder.AppendVertex(vtx);
314314
vtx.position = polyline.points[point_i - 1] - offset;
315315
vtx_builder.AppendVertex(vtx);
316-
vtx.position = polyline.points[point_i] + offset;
317-
vtx_builder.AppendVertex(vtx);
318-
vtx.position = polyline.points[point_i] - offset;
319-
vtx_builder.AppendVertex(vtx);
320316

321317
if (point_i < contour_end_point_i - 1) {
322318
compute_offset(point_i + 1);

0 commit comments

Comments
 (0)