Shape outline = Tx.createTransformedShape(path);
// apply the clip-path of the current Element
ShapeNode outlineNode = gvtFactory.createShapeNode();
outlineNode.setShape(outline);
Clip clip = CSSUtilities.convertClipPath(child,
outlineNode,
ctx);
if (clip != null) {
Area area = new Area(outline);
area.subtract(new Area(clip.getClipPath()));
outline = area;
}
clipPath.add(new Area(outline));
}
// restore the viewport
ctx.setCurrentViewport(oldViewport);
if (!hasChildren) {
return null; // no clipPath defined
}
// apply the clip-path of this clipPath Element (already in user space)
ShapeNode clipPathNode = gvtFactory.createShapeNode();
clipPathNode.setShape(clipPath);
Clip clipElementClipPath =
CSSUtilities.convertClipPath(clipElement, clipPathNode, ctx);
if (clipElementClipPath != null) {
clipPath.subtract(new Area(clipElementClipPath.getClipPath()));
}
// OTHER PROBLEM: SHOULD TAKE MASK REGION INTO ACCOUNT
Filter filter = gn.getFilter();
if (filter == null) {