|
|
|
@@ -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);
|
|
|
|
|