mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed a problem with the SVG parser
This commit is contained in:
parent
6d49b9d99c
commit
39cb22cf5e
1 changed files with 0 additions and 33 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue