Skip to content

Commit

Permalink
Merge pull request #112 from codeprof/patch-4
Browse files Browse the repository at this point in the history
Strange behaviour when width or height of a drawn rounded rectangle is 0
  • Loading branch information
cameronwhite committed Dec 4, 2015
2 parents 798d6c7 + f0d93de commit 83f878b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Pinta.Tools/Editable/Shapes/RoundedLineEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private void calculateSegmentEndPoints(int currentIndex, out int nextIndex, out
double currentOffsetRatio;

//Prevent a divide by 0 error.
if (currentDistance < 0d)
if (currentDistance <= 0d)
{
currentOffsetRatio = 0d;
}
Expand All @@ -225,7 +225,7 @@ private void calculateSegmentEndPoints(int currentIndex, out int nextIndex, out
double nextOffsetRatio;

//Prevent a divide by 0 error.
if (nextDistance < 0d)
if (nextDistance <= 0d)
{
nextOffsetRatio = 0d;
}
Expand Down

0 comments on commit 83f878b

Please sign in to comment.