getClipPath method

SVGClipPath? getClipPath(
  1. dynamic attribute,
  2. Rect rect
)

Implementation

SVGClipPath? getClipPath(attribute, Rect rect) {
  NodeList nodeList = childNodes;
  Iterator iterator = nodeList.iterator;
  while (iterator.moveNext()) {
    if (iterator.current is SVGClipPathElement) {
      SVGClipPathElement element = iterator.current;
      dynamic id = element.attributeStyle['id'];
      if (attribute == 'url(#$id)') {
        return element.parseClipPath();
      }
    }
  }
  return null;
}