public AttributeList(AttributeList a) { if (a.attrs != null) attrs = new Dictionary<string,string>(a.attrs); else attrs = null; }
public Node(SVGNodeName name, AttributeList attributes, int depth) { this.parent = null; this.children = new List<Node>(); this.name = name; this.attributes = attributes; this.depth = depth; }
public Node(SVGNodeName name, AttributeList attributes, int depth) { this.parent = null; this.children = new List <Node>(); this.name = name; this.attributes = attributes; this.depth = depth; }
public AttributeList(AttributeList a) { if (a.attrs != null) { attrs = new Dictionary <string, string>(a.attrs); } else { attrs = null; } }
public void OnStyleElement(string name, AttributeList attrs, string style) { Node node = new InlineNode(Lookup(name), new AttributeList(attrs), _currentDepth); node.content = style; node.parent = _lastParent; if (_lastParent != null) { _lastParent.children.Add(node); } AddNode(node); }
public void OnInlineElement(string name, AttributeList attrs) { Node node = new InlineNode(Lookup(name), new AttributeList(attrs), _currentDepth); // Debug.Log("OnInlineElement: "+name); node.parent = _lastParent; if (_lastParent != null) { _lastParent.children.Add(node); } OnNode(node); }
public void OnStartElement(string name, AttributeList attrs) { Node node = new BlockOpenNode(Lookup(name), new AttributeList(attrs), _currentDepth++); // Debug.Log("OnStartElement: "+name); node.parent = _lastParent; if (_lastParent != null) { _lastParent.children.Add(node); } _lastParent = node; OnNode(node); //Debug.Log("OnStartElement: "+node.name+", depth: "+node.depth); }
public SVGElement(SVGParser xmlImp, SVGTransformList inheritTransformList, SVGPaintable inheritPaintable, bool root = false) : base(inheritTransformList) { _rootElement = root; _name = _attrList.GetValue("id"); _xmlImp = xmlImp; _attrList = _xmlImp.node.attributes; if(inheritPaintable != null) { _paintable = new SVGPaintable(inheritPaintable, _xmlImp.node); } else { _paintable = new SVGPaintable(_xmlImp.node); } Init(); }
public SVGElement(SVGParser xmlImp, SVGTransformList inheritTransformList, SVGPaintable inheritPaintable, bool root = false) : base(inheritTransformList) { _rootElement = root; _name = _attrList.GetValue("id"); _xmlImp = xmlImp; _attrList = _xmlImp.node.attributes; if (inheritPaintable != null) { _paintable = new SVGPaintable(inheritPaintable, _xmlImp.node); } else { _paintable = new SVGPaintable(_xmlImp.node); } Init(); }
public BlockOpenNode(SVGNodeName name, AttributeList attributes, int depth) : base(name, attributes, depth) { }
public InlineNode(SVGNodeName name, AttributeList attributes, int depth) : base(name, attributes, depth) { }
public void OnStyleElement(string name, AttributeList attrs, string style) { Node node = new InlineNode(Lookup(name), new AttributeList(attrs), _currentDepth); node.content = style; node.parent = _lastParent; if (_lastParent != null) { _lastParent.children.Add(node); } AddNode(node); }
public void OnStartElement(string name, AttributeList attrs) { Node node = new BlockOpenNode(Lookup(name), new AttributeList(attrs), _currentDepth++); // Debug.Log("OnStartElement: "+name); node.parent = _lastParent; if (_lastParent != null) { _lastParent.children.Add(node); } _lastParent = node; OnNode(node); //Debug.Log("OnStartElement: "+node.name+", depth: "+node.depth); }
public void OnInlineElement(string name, AttributeList attrs) { Node node = new InlineNode(Lookup(name), new AttributeList(attrs), _currentDepth); // Debug.Log("OnInlineElement: "+name); node.parent = _lastParent; if (_lastParent != null) { _lastParent.children.Add(node); } OnNode(node); }
public InlineNode(SVGNodeName name, AttributeList attributes, int depth) : base(name, attributes, depth) { }
private void ReadAttribute(ref AttributeList a) { SkipWhitespaces(true); if (Peek() == '/' || Peek() == '>') // came here just to spend trailing whitespaces return; string name = ReadName(); string value; SkipWhitespaces(); Expect('='); SkipWhitespaces(); switch (Read()) { case '\'': value = ReadUntil('\'', true); break; case '"': value = ReadUntil('"', true); break; default: throw Error("Invalid attribute value markup."); } a.Add(name, value); }
public BlockOpenNode(SVGNodeName name, AttributeList attributes, int depth) : base(name, attributes, depth) { }