1 18 package org.apache.batik.dom.svg; 19 20 import org.apache.batik.util.SVGConstants; 21 import org.w3c.dom.svg.SVGPointList; 22 23 30 public class SVGAnimatedPointsSupport { 31 32 35 public static final String POINTS_DEFAULT_VALUE 36 = ""; 37 38 42 public static SVGPointList getPoints(AbstractElement e){ 43 SVGOMAnimatedPoints result =(SVGOMAnimatedPoints) 44 e.getLiveAttributeValue(null, SVGConstants.SVG_POINTS_ATTRIBUTE); 45 if (result == null) { 46 result = new SVGOMAnimatedPoints(e, null, 47 SVGConstants.SVG_POINTS_ATTRIBUTE, 48 POINTS_DEFAULT_VALUE); 49 e.putLiveAttributeValue(null, 50 SVGConstants.SVG_POINTS_ATTRIBUTE, result); 51 } 52 return result.getPoints(); 53 } 54 55 56 60 public static SVGPointList getAnimatedPoints(AbstractElement e){ 61 62 SVGOMAnimatedPoints result =(SVGOMAnimatedPoints) 63 e.getLiveAttributeValue(null, SVGConstants.SVG_POINTS_ATTRIBUTE); 64 if (result == null) { 65 result = new SVGOMAnimatedPoints(e, null, 66 SVGConstants.SVG_POINTS_ATTRIBUTE, 67 POINTS_DEFAULT_VALUE); 68 e.putLiveAttributeValue(null, 69 SVGConstants.SVG_POINTS_ATTRIBUTE, result); 70 } 71 return result.getAnimatedPoints(); 72 } 73 74 } 75 | Popular Tags |