Browse Source

Minor tidying.

tags/2021-05-28
jules 12 years ago
parent
commit
569fe21e7f
1 changed files with 31 additions and 33 deletions
  1. +31
    -33
      modules/juce_graphics/geometry/juce_PathIterator.cpp

+ 31
- 33
modules/juce_graphics/geometry/juce_PathIterator.cpp View File

@@ -69,48 +69,45 @@ bool PathFlatteningIterator::next()
float y3 = 0;
float x4 = 0;
float y4 = 0;
float type;
for (;;)
{
float type;
if (stackPos == stackBase)
{
if (index >= path.numElements)
{
return false;
}
else
type = points [index++];
if (type != Path::closeSubPathMarker)
{
type = points [index++];
x2 = points [index++];
y2 = points [index++];
if (type == Path::quadMarker)
{
x3 = points [index++];
y3 = points [index++];
if (! isIdentityTransform)
transform.transformPoints (x2, y2, x3, y3);
}
else if (type == Path::cubicMarker)
{
x3 = points [index++];
y3 = points [index++];
x4 = points [index++];
y4 = points [index++];
if (type != Path::closeSubPathMarker)
if (! isIdentityTransform)
transform.transformPoints (x2, y2, x3, y3, x4, y4);
}
else
{
x2 = points [index++];
y2 = points [index++];
if (type == Path::quadMarker)
{
x3 = points [index++];
y3 = points [index++];
if (! isIdentityTransform)
transform.transformPoints (x2, y2, x3, y3);
}
else if (type == Path::cubicMarker)
{
x3 = points [index++];
y3 = points [index++];
x4 = points [index++];
y4 = points [index++];
if (! isIdentityTransform)
transform.transformPoints (x2, y2, x3, y3, x4, y4);
}
else
{
if (! isIdentityTransform)
transform.transformPoint (x2, y2);
}
if (! isIdentityTransform)
transform.transformPoint (x2, y2);
}
}
}
@@ -150,7 +147,8 @@ bool PathFlatteningIterator::next()
return true;
}
else if (type == Path::quadMarker)
if (type == Path::quadMarker)
{
const size_t offset = (size_t) (stackPos - stackBase);


Loading…
Cancel
Save