1 18 package org.apache.batik.dom.svg; 19 20 import org.apache.batik.dom.AbstractDocument; 21 import org.w3c.dom.svg.SVGAnimatedEnumeration; 22 import org.w3c.dom.svg.SVGAnimatedNumber; 23 import org.w3c.dom.svg.SVGAnimatedNumberList; 24 import org.w3c.dom.svg.SVGComponentTransferFunctionElement; 25 26 32 public abstract class SVGOMComponentTransferFunctionElement 33 extends SVGOMElement 34 implements SVGComponentTransferFunctionElement { 35 36 39 protected final static String [] TYPE_VALUES = { 40 "", 41 SVG_IDENTITY_VALUE, 42 SVG_TABLE_VALUE, 43 SVG_DISCRETE_VALUE, 44 SVG_LINEAR_VALUE, 45 SVG_GAMMA_VALUE 46 }; 47 48 51 protected SVGOMComponentTransferFunctionElement() { 52 } 53 54 59 protected SVGOMComponentTransferFunctionElement(String prefix, 60 AbstractDocument owner) { 61 super(prefix, owner); 62 } 63 64 68 public SVGAnimatedEnumeration getType() { 69 return getAnimatedEnumerationAttribute 70 (null, SVG_TYPE_ATTRIBUTE, TYPE_VALUES, (short)1); 71 } 72 73 77 public SVGAnimatedNumberList getTableValues() { 78 throw new RuntimeException ("!!! TODO: getTableValues"); 79 } 80 81 85 public SVGAnimatedNumber getSlope() { 86 return getAnimatedNumberAttribute(null, SVG_SLOPE_ATTRIBUTE, 1f); 87 } 88 89 93 public SVGAnimatedNumber getIntercept() { 94 return getAnimatedNumberAttribute(null, SVG_INTERCEPT_ATTRIBUTE, 0f); 95 } 96 97 101 public SVGAnimatedNumber getAmplitude() { 102 return getAnimatedNumberAttribute(null, SVG_AMPLITUDE_ATTRIBUTE, 1f); 103 } 104 105 109 public SVGAnimatedNumber getExponent() { 110 return getAnimatedNumberAttribute(null, SVG_EXPONENT_ATTRIBUTE, 1f); 111 } 112 113 117 public SVGAnimatedNumber getOffset() { 118 return getAnimatedNumberAttribute(null, SVG_OFFSET_ATTRIBUTE, 0f); 119 } 120 } 121 | Popular Tags |