1 18 package org.apache.batik.dom.svg; 19 20 import org.apache.batik.dom.AbstractDocument; 21 import org.w3c.dom.Node ; 22 import org.w3c.dom.svg.SVGAnimatedEnumeration; 23 import org.w3c.dom.svg.SVGAnimatedLength; 24 import org.w3c.dom.svg.SVGMaskElement; 25 26 32 public class SVGOMMaskElement 33 extends SVGGraphicsElement 34 implements SVGMaskElement { 35 36 39 protected final static String [] UNITS_VALUES = { 40 "", 41 SVG_USER_SPACE_ON_USE_VALUE, 42 SVG_OBJECT_BOUNDING_BOX_VALUE 43 }; 44 45 48 protected SVGOMMaskElement() { 49 } 50 51 56 public SVGOMMaskElement(String prefix, AbstractDocument owner) { 57 super(prefix, owner); 58 } 59 60 63 public String getLocalName() { 64 return SVG_MASK_TAG; 65 } 66 67 70 public SVGAnimatedEnumeration getMaskUnits() { 71 return getAnimatedEnumerationAttribute 72 (null, SVG_MASK_UNITS_ATTRIBUTE, UNITS_VALUES, 73 (short)2); 74 } 75 76 79 public SVGAnimatedEnumeration getMaskContentUnits() { 80 return getAnimatedEnumerationAttribute 81 (null, SVG_MASK_CONTENT_UNITS_ATTRIBUTE, UNITS_VALUES, 82 (short)1); 83 } 84 85 88 public SVGAnimatedLength getX() { 89 return getAnimatedLengthAttribute 90 (null, SVG_X_ATTRIBUTE, SVG_MASK_X_DEFAULT_VALUE, 91 SVGOMAnimatedLength.HORIZONTAL_LENGTH); 92 } 93 94 97 public SVGAnimatedLength getY() { 98 return getAnimatedLengthAttribute 99 (null, SVG_Y_ATTRIBUTE, SVG_MASK_Y_DEFAULT_VALUE, 100 SVGOMAnimatedLength.VERTICAL_LENGTH); 101 } 102 103 106 public SVGAnimatedLength getWidth() { 107 return getAnimatedLengthAttribute 108 (null, SVG_WIDTH_ATTRIBUTE, SVG_MASK_WIDTH_DEFAULT_VALUE, 109 SVGOMAnimatedLength.HORIZONTAL_LENGTH); 110 } 111 112 115 public SVGAnimatedLength getHeight() { 116 return getAnimatedLengthAttribute 117 (null, SVG_HEIGHT_ATTRIBUTE, SVG_MASK_HEIGHT_DEFAULT_VALUE, 118 SVGOMAnimatedLength.VERTICAL_LENGTH); 119 } 120 121 124 protected Node newNode() { 125 return new SVGOMMaskElement(); 126 } 127 } 128 | Popular Tags |