Browse Source

Fixed a problem with the SVG parser

tags/2021-05-28
jules 8 years ago
parent
commit
39cb22cf5e
1 changed files with 0 additions and 33 deletions
  1. +0
    -33
      modules/juce_gui_basics/drawables/juce_SVGParser.cpp

+ 0
- 33
modules/juce_gui_basics/drawables/juce_SVGParser.cpp View File

@@ -75,20 +75,6 @@ public:
}
};
struct UseShapeOp
{
const SVGState* state;
Path* sourcePath;
AffineTransform* transform;
Drawable* target;
bool operator() (const XmlPath& xmlPath)
{
target = state->parseShape (xmlPath, *sourcePath, true, transform);
return target != nullptr;
}
};
struct UseTextOp
{
const SVGState* state;
@@ -690,22 +676,6 @@ private:
}
//==============================================================================
Drawable* useShape (const XmlPath& xml, Path& path) const
{
auto translation = AffineTransform::translation ((float) xml->getDoubleAttribute ("x", 0.0),
(float) xml->getDoubleAttribute ("y", 0.0));
UseShapeOp op = { this, &path, &translation, nullptr };
auto linkedID = getLinkedID (xml);
if (linkedID.isNotEmpty())
topLevelXml.applyOperationToChildWithID (linkedID, op);
return op.target;
}
Drawable* parseShape (const XmlPath& xml, Path& path,
const bool shouldParseTransform = true,
AffineTransform* additonalTransform = nullptr) const
@@ -718,9 +688,6 @@ private:
return newState.parseShape (xml, path, false, additonalTransform);
}
if (xml->hasTagName ("use"))
return useShape (xml, path);
auto dp = new DrawablePath();
setCommonAttributes (*dp, xml);
dp->setFill (Colours::transparentBlack);


Loading…
Cancel
Save