1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-09 04:30:09 +00:00

small fix to sort out stroking of paths that contain lines of 0 length.

This commit is contained in:
jules 2009-01-02 14:33:42 +00:00
parent 6ea5f864a3
commit 01ad91d851
4 changed files with 10 additions and 2 deletions

View file

@ -85740,6 +85740,8 @@ bool PathFlatteningIterator::next() throw()
}
else
{
jassert (type == Path::moveMarker);
subPathIndex = -1;
subPathCloseX = x1 = x2;
subPathCloseY = y1 = y2;

View file

@ -39562,7 +39562,9 @@ public:
int subPathIndex;
/** Returns true if the current segment is the last in the current sub-path. */
bool isLastInSubpath() const throw() { return stackPos == stackBase; }
bool isLastInSubpath() const throw() { return stackPos == stackBase
&& (index >= path.numElements
|| points [index] == Path::moveMarker); }
juce_UseDebuggingNewOperator

View file

@ -286,6 +286,8 @@ bool PathFlatteningIterator::next() throw()
}
else
{
jassert (type == Path::moveMarker);
subPathIndex = -1;
subPathCloseX = x1 = x2;
subPathCloseY = y1 = y2;

View file

@ -101,7 +101,9 @@ public:
int subPathIndex;
/** Returns true if the current segment is the last in the current sub-path. */
bool isLastInSubpath() const throw() { return stackPos == stackBase; }
bool isLastInSubpath() const throw() { return stackPos == stackBase
&& (index >= path.numElements
|| points [index] == Path::moveMarker); }
//==============================================================================