1 18 package org.apache.batik.bridge; 19 20 import java.awt.Color ; 21 import java.awt.geom.Rectangle2D ; 22 import java.util.Map ; 23 24 import org.apache.batik.ext.awt.image.renderable.Filter; 25 import org.apache.batik.ext.awt.image.renderable.FloodRable8Bit; 26 import org.apache.batik.gvt.GraphicsNode; 27 import org.w3c.dom.Element ; 28 29 35 public class SVGFeFloodElementBridge 36 extends AbstractSVGFilterPrimitiveElementBridge { 37 38 41 public SVGFeFloodElementBridge() {} 42 43 46 public String getLocalName() { 47 return SVG_FE_FLOOD_TAG; 48 } 49 50 68 public Filter createFilter(BridgeContext ctx, 69 Element filterElement, 70 Element filteredElement, 71 GraphicsNode filteredNode, 72 Filter inputFilter, 73 Rectangle2D filterRegion, 74 Map filterMap) { 75 76 Rectangle2D primitiveRegion 77 = SVGUtilities.convertFilterPrimitiveRegion(filterElement, 78 filteredElement, 79 filteredNode, 80 filterRegion, 81 filterRegion, 82 ctx); 83 84 Color color = CSSUtilities.convertFloodColor(filterElement, ctx); 85 86 Filter filter = new FloodRable8Bit(primitiveRegion, color); 87 88 handleColorInterpolationFilters(filter, filterElement); 90 91 updateFilterMap(filterElement, filter, filterMap); 93 94 return filter; 95 } 96 } 97 | Popular Tags |