1 18 package org.apache.batik.bridge; 19 20 import java.awt.geom.Rectangle2D ; 21 import java.util.Map ; 22 23 import org.apache.batik.ext.awt.image.renderable.Filter; 24 import org.apache.batik.ext.awt.image.renderable.TileRable8Bit; 25 import org.apache.batik.gvt.GraphicsNode; 26 import org.w3c.dom.Element ; 27 28 34 public class SVGFeTileElementBridge 35 extends AbstractSVGFilterPrimitiveElementBridge { 36 37 38 41 public SVGFeTileElementBridge() {} 42 43 46 public String getLocalName() { 47 return SVG_FE_TILE_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 77 Rectangle2D defaultRegion = filterRegion; 80 Rectangle2D primitiveRegion 81 = SVGUtilities.convertFilterPrimitiveRegion(filterElement, 82 filteredElement, 83 filteredNode, 84 defaultRegion, 85 filterRegion, 86 ctx); 87 88 Filter in = getIn(filterElement, 90 filteredElement, 91 filteredNode, 92 inputFilter, 93 filterMap, 94 ctx); 95 if (in == null) { 96 return null; } 98 99 Filter filter 100 = new TileRable8Bit(in, primitiveRegion, in.getBounds2D(), false); 101 102 handleColorInterpolationFilters(filter, filterElement); 104 105 updateFilterMap(filterElement, filter, filterMap); 107 108 return filter; 109 } 110 } 111 | Popular Tags |