1 18 19 package org.apache.batik.dom.svg; 20 21 import org.apache.batik.util.SVGConstants; 22 import org.w3c.dom.svg.SVGAnimatedPreserveAspectRatio; 23 24 28 public class SVGPreserveAspectRatioSupport { 29 34 public static SVGAnimatedPreserveAspectRatio 35 getPreserveAspectRatio(AbstractElement elt) { 36 SVGOMAnimatedPreserveAspectRatio ret; 37 ret = (SVGOMAnimatedPreserveAspectRatio)elt.getLiveAttributeValue 38 (null, SVGConstants.SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE); 39 40 if (ret == null) { 41 ret = new SVGOMAnimatedPreserveAspectRatio(elt); 42 elt.putLiveAttributeValue 43 (null, SVGConstants.SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE, ret); 44 } 45 return ret; 46 } 47 } 48 | Popular Tags |