Skip to content

Commit

Permalink
[ShapeComponent] Rewind the Path before drawing the stroke
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowsky committed Nov 26, 2024
1 parent 1143efc commit 28d4d02
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 by Patryk Goworowski and Patrick Michalik.
* Copyright 2024 by Patryk Goworowski and Patrick Michalik.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -111,7 +111,10 @@ public open class ShapeComponent(
}

paint.withOpacity(opacity, ::drawShape)
if (strokeWidth > 0f && strokeColor.alpha > 0) strokePaint.withOpacity(opacity, ::drawShape)
if (strokeWidth > 0f && strokeColor.alpha > 0) {
if (!path.isEmpty) path.rewind()
strokePaint.withOpacity(opacity, ::drawShape)
}

DebugHelper.drawDebugBounds(
context = context,
Expand Down

0 comments on commit 28d4d02

Please sign in to comment.