if (node.getNodeType() != Node.ELEMENT_NODE) {
continue;
}
Element child = (Element)node;
GraphicsNode clipNode = builder.build(ctx, child) ;
// check if a GVT node has been created
if (clipNode == null) {
continue;
}
hasChildren = true;
// if this is a 'use' element, get the actual shape used
if (child instanceof CSSImportNode) {
SVGOMCSSImportedElementRoot shadow =
(SVGOMCSSImportedElementRoot)
((CSSImportNode) child).getCSSImportedElementRoot();
if (shadow != null) {
Node shadowChild = shadow.getFirstChild();
if (shadowChild != null
&& shadowChild.getNodeType() == Node.ELEMENT_NODE) {
child = (Element) shadowChild;
}
}
}
// compute the outline of the current clipPath's child
int wr = CSSUtilities.convertClipRule(child);
GeneralPath path = new GeneralPath(clipNode.getOutline());
path.setWindingRule(wr);
AffineTransform at = clipNode.getTransform();
if (at == null) at = Tx;
else at.preConcatenate(Tx);
Shape outline = at.createTransformedShape(path);