1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-04 03:40:07 +00:00

Made the SVG parser set the component ID of the drawables it creates.

This commit is contained in:
jules 2014-06-19 15:29:51 +01:00
parent c7ed08a008
commit fd21b02845

View file

@ -54,7 +54,7 @@ public:
DrawableComposite* const drawable = new DrawableComposite();
drawable->setName (xml->getStringAttribute ("id"));
setDrawableID (*drawable, xml);
SVGState newState (*this);
@ -363,6 +363,13 @@ private:
AffineTransform transform;
String cssStyleText;
static void setDrawableID (Drawable& d, const XmlPath& xml)
{
String compID (xml->getStringAttribute ("id"));
d.setName (compID);
d.setComponentID (compID);
}
//==============================================================================
void parseSubElements (const XmlPath& xml, DrawableComposite& parentDrawable)
{
@ -402,7 +409,7 @@ private:
{
DrawableComposite* const drawable = new DrawableComposite();
drawable->setName (xml->getStringAttribute ("id"));
setDrawableID (*drawable, xml);
if (xml->hasAttribute ("transform"))
{
@ -547,7 +554,7 @@ private:
}
DrawablePath* dp = new DrawablePath();
dp->setName (xml->getStringAttribute ("id"));
setDrawableID (*dp, xml);
dp->setFill (Colours::transparentBlack);
path.applyTransform (transform);