r2d = cgn.getBackgroundEnable();
}
Vector srcs = new Vector();
if (r2d == null) {
Filter f = getBackground(gn.getParent(), gn, rc);
if (f == null)
return null;
srcs.add(f);
}
if (gn instanceof CompositeGraphicsNode) {
CompositeGraphicsNode cgn = (CompositeGraphicsNode)gn;
List children = cgn.getChildren();
Iterator i = children.iterator();
while (i.hasNext()) {
GraphicsNode childGN = (GraphicsNode)i.next();
if (childGN == child)
break;
GraphicsNodeRable gnr;
GraphicsNodeRableFactory gnrf;
gnrf = rc.getGraphicsNodeRableFactory();
gnr = gnrf.createGraphicsNodeRable(childGN);
gnr.setUsePrimitivePaint(false);
srcs.add(gnr);
}
}
if (srcs.size() == 0)
return null;
Filter ret = null;
if (srcs.size() == 1)
ret = (Filter)srcs.get(0);
else
ret = new ConcreteCompositeRable(srcs, CompositeRule.OVER);