Skip to content

Commit b2e20fc

Browse files
Strokes with zero width should not be painted (#798)
Fix #797
1 parent 20b909f commit b2e20fc

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
Lines changed: 3 additions & 0 deletions
Loading
619 Bytes
Loading

third_party/lib/src/vector_drawable.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,10 @@ class DrawableShape implements DrawableStyleable {
12931293
canvas.drawPath(path, style.fill!.toFlutterPaint());
12941294
}
12951295

1296-
if (style.stroke?.color != null) {
1296+
if (style.stroke?.color != null &&
1297+
(style.stroke!.strokeWidth == null ||
1298+
(style.stroke!.strokeWidth != null &&
1299+
style.stroke!.strokeWidth! > 0))) {
12971300
assert(style.stroke!.style == PaintingStyle.stroke);
12981301
if (style.dashArray != null &&
12991302
!identical(style.dashArray, DrawableStyle.emptyDashArray)) {

0 commit comments

Comments
 (0)