1 /**********************************************
2 * Copyright (C) 2010 Lukas Laag
3 * This file is part of lib-gwt-svg.
4 *
5 * libgwtsvg is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * libgwtsvg is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with libgwtsvg. If not, see http://www.gnu.org/licenses/
17 **********************************************/
18 /*
19 * Copyright (c) 2004 World Wide Web Consortium,
20 *
21 * (Massachusetts Institute of Technology, European Research Consortium for
22 * Informatics and Mathematics, Keio University). All Rights Reserved. This
23 * work is distributed under the W3C(r) Software License [1] in the hope that
24 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26 *
27 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
28 */
29
30 package org.vectomatic.dom.svg;
31
32 import org.vectomatic.dom.svg.impl.SVGFEColorMatrixElement;
33 import org.vectomatic.dom.svg.itf.ISVGFilterPrimitiveStandardAttributes;
34 import org.vectomatic.dom.svg.utils.DOMHelper;
35 import org.vectomatic.dom.svg.utils.SVGConstants;
36
37 import com.google.gwt.dom.client.TagName;
38
39 /**
40 * The {@link org.vectomatic.dom.svg.OMSVGFEColorMatrixElement} interface
41 * corresponds to the <a href='http://www.w3.org/TR/SVG11/filters.html#feColorMatrixElement'
42 * title='feColorMatrix element specification'>feColorMatrix</a> element.
43 */
44 @TagName("feColorMatrix")
45 public class OMSVGFEColorMatrixElement extends OMSVGElement implements ISVGFilterPrimitiveStandardAttributes {
46 /**
47 * The type is not one of predefined types. It is invalid to attempt to define
48 * a new value of this type or to attempt to switch an existing value to this
49 * type.
50 */
51 public static final short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
52 /**
53 * Corresponds to value <span class="attr-value">'matrix'</span>.
54 */
55 public static final short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
56 /**
57 * Corresponds to value <span class="attr-value">'saturate'</span>.
58 */
59 public static final short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
60 /**
61 * Corresponds to value <span class="attr-value">'hueRotate'</span>.
62 */
63 public static final short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
64 /**
65 * Corresponds to value <span class="attr-value">'luminanceToAlpha'</span>.
66 */
67 public static final short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
68 public OMSVGFEColorMatrixElement() {
69 this((SVGFEColorMatrixElement)DOMHelper.createElementNS(DOMHelper.getCurrentDocument(), SVGConstants.SVG_NAMESPACE_URI, SVGConstants.SVG_FE_COLOR_MATRIX_TAG).cast());
70 }
71
72 protected OMSVGFEColorMatrixElement(SVGFEColorMatrixElement ot) {
73 super(ot);
74 }
75
76 // Implementation of the svg::SVGFEColorMatrixElement W3C IDL interface
77 /**
78 * Corresponds to attribute <code>in</code> on the given <a href='http://www.w3.org/TR/SVG11/filters.html#feColorMatrixElement'
79 * title='feColorMatrix element specification'>feColorMatrix</a> element.
80 */
81 public final OMSVGAnimatedString getIn1() {
82 return ((SVGFEColorMatrixElement)ot).getIn1();
83 }
84 /**
85 * Corresponds to attribute {@link org.vectomatic.dom.svg.OMSVGFEColorMatrixElement#getType()}
86 * on the given <a href='http://www.w3.org/TR/SVG11/filters.html#feColorMatrixElement'
87 * title='feColorMatrix element specification'>feColorMatrix</a> element.
88 * Takes one of the SVG_FECOLORMATRIX_TYPE_ constants defined on this interface.
89 */
90 public final OMSVGAnimatedEnumeration getType() {
91 return ((SVGFEColorMatrixElement)ot).getType();
92 }
93 /**
94 * Corresponds to attribute {@link org.vectomatic.dom.svg.OMSVGFEColorMatrixElement#getValues()}
95 * on the given <a href='http://www.w3.org/TR/SVG11/filters.html#feColorMatrixElement'
96 * title='feColorMatrix element specification'>feColorMatrix</a> element.
97 */
98 public final OMSVGAnimatedNumberList getValues() {
99 return ((SVGFEColorMatrixElement)ot).getValues();
100 }
101
102 // Implementation of the svg::SVGFilterPrimitiveStandardAttributes W3C IDL interface
103 /**
104 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFilterPrimitiveStandardAttributes#getX()}
105 * on the given element.
106 */
107 public final OMSVGAnimatedLength getX() {
108 return ((SVGFEColorMatrixElement)ot).getX();
109 }
110 /**
111 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFilterPrimitiveStandardAttributes#getY()}
112 * on the given element.
113 */
114 public final OMSVGAnimatedLength getY() {
115 return ((SVGFEColorMatrixElement)ot).getY();
116 }
117 /**
118 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFilterPrimitiveStandardAttributes#getWidth()}
119 * on the given element.
120 */
121 public final OMSVGAnimatedLength getWidth() {
122 return ((SVGFEColorMatrixElement)ot).getWidth();
123 }
124 /**
125 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFilterPrimitiveStandardAttributes#getHeight()}
126 * on the given element.
127 */
128 public final OMSVGAnimatedLength getHeight() {
129 return ((SVGFEColorMatrixElement)ot).getHeight();
130 }
131 /**
132 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFilterPrimitiveStandardAttributes#getResult()}
133 * on the given element.
134 */
135 public final OMSVGAnimatedString getResult() {
136 return ((SVGFEColorMatrixElement)ot).getResult();
137 }
138
139 }