Browse Source

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

tags/2021-05-28
jules 17 years ago
parent
commit
01ad91d851
4 changed files with 10 additions and 2 deletions
  1. +2
    -0
      juce_amalgamated.cpp
  2. +3
    -1
      juce_amalgamated.h
  3. +2
    -0
      src/juce_appframework/gui/graphics/geometry/juce_PathIterator.cpp
  4. +3
    -1
      src/juce_appframework/gui/graphics/geometry/juce_PathIterator.h

+ 2
- 0
juce_amalgamated.cpp View File

@@ -85740,6 +85740,8 @@ bool PathFlatteningIterator::next() throw()
}
else
{
jassert (type == Path::moveMarker);

subPathIndex = -1;
subPathCloseX = x1 = x2;
subPathCloseY = y1 = y2;


+ 3
- 1
juce_amalgamated.h 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



+ 2
- 0
src/juce_appframework/gui/graphics/geometry/juce_PathIterator.cpp View File

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


+ 3
- 1
src/juce_appframework/gui/graphics/geometry/juce_PathIterator.h 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); }
//==============================================================================


Loading…
Cancel
Save