ctx);
// Now, extract the various transfer functions. They are
// defined in the filterElement's children.
// Functions are ordered as follow: r, g, b, a.
ComponentTransferFunction funcR = null;
ComponentTransferFunction funcG = null;
ComponentTransferFunction funcB = null;
ComponentTransferFunction funcA = null;
for (Node n = filterElement.getFirstChild();
n != null;
n = n.getNextSibling()) {
if (n.getNodeType() != Node.ELEMENT_NODE) {
continue;
}
Element e = (Element)n;
Bridge bridge = ctx.getBridge(e);
if (bridge == null || !(bridge instanceof SVGFeFuncElementBridge)) {
continue;
}
SVGFeFuncElementBridge funcBridge
= (SVGFeFuncElementBridge)bridge;
ComponentTransferFunction func
= funcBridge.createComponentTransferFunction(filterElement, e);
if (funcBridge instanceof SVGFeFuncRElementBridge) {
funcR = func;
} else if (funcBridge instanceof SVGFeFuncGElementBridge) {
funcG = func;