Browse Source

SVG: Fixed a couple of parsing bugs

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
e88228a036
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      modules/juce_gui_basics/drawables/juce_SVGParser.cpp

+ 10
- 3
modules/juce_gui_basics/drawables/juce_SVGParser.cpp View File

@@ -311,7 +311,11 @@ public:
p3 += last;
}
p2 = last + (last - last2);
p2 = last;
if (CharPointer_ASCII ("CcSs").indexOf (previousCommand) >= 0)
p2 += (last - last2);
path.cubicTo (p2, p1, p3);
last2 = p1;
@@ -344,8 +348,11 @@ public:
if (isRelative)
p1 += last;
p2 = CharPointer_ASCII ("QqTt").indexOf (previousCommand) >= 0 ? last + (last - last2)
: p1;
p2 = last;
if (CharPointer_ASCII ("QqTt").indexOf (previousCommand) >= 0)
p2 += (last - last2);
path.quadraticTo (p2, p1);
last2 = p2;


Loading…
Cancel
Save