fromElement static method
XmlElement?
fromElement(
- XmlElement element
Converts any of svg's basic shapes into a path
element.
Implementation
static XmlElement? fromElement(XmlElement element) {
switch (element.name.local) {
case ElementName.line:
return PathConverter.fromLine(element);
case ElementName.rect:
return PathConverter.fromRect(element);
case ElementName.circle:
return PathConverter.fromCircle(element);
case ElementName.ellipse:
return PathConverter.fromEllipse(element);
case ElementName.polygon:
return PathConverter.fromPoly(element);
case ElementName.polyline:
return PathConverter.fromPoly(element, isPolyline: true);
}
return null;
}