01: /*
02:
03: Licensed to the Apache Software Foundation (ASF) under one or more
04: contributor license agreements. See the NOTICE file distributed with
05: this work for additional information regarding copyright ownership.
06: The ASF licenses this file to You under the Apache License, Version 2.0
07: (the "License"); you may not use this file except in compliance with
08: the License. You may obtain a copy of the License at
09:
10: http://www.apache.org/licenses/LICENSE-2.0
11:
12: Unless required by applicable law or agreed to in writing, software
13: distributed under the License is distributed on an "AS IS" BASIS,
14: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: See the License for the specific language governing permissions and
16: limitations under the License.
17:
18: */
19: package org.apache.batik.dom.svg;
20:
21: import java.awt.geom.AffineTransform;
22:
23: import org.w3c.dom.DOMException;
24: import org.w3c.dom.svg.SVGMatrix;
25:
26: /**
27: * This class is the implementation of the SVGTransform interface.
28: *
29: * @author <a href="mailto:nicolas.socheleau@bitflash.com">Nicolas Socheleau</a>
30: * @version $Id: SVGOMTransform.java 475477 2006-11-15 22:44:28Z cam $
31: */
32: public class SVGOMTransform extends AbstractSVGTransform {
33:
34: /**
35: * Creates a new SVGOMTransform.
36: */
37: public SVGOMTransform() {
38: affineTransform = new AffineTransform();
39: }
40:
41: /**
42: * Creates a new, modifiable SVGMatrix.
43: */
44: protected SVGMatrix createMatrix() {
45: return new AbstractSVGMatrix() {
46: protected AffineTransform getAffineTransform() {
47: return SVGOMTransform.this .affineTransform;
48: }
49:
50: public void setA(float a) throws DOMException {
51: SVGOMTransform.this .setType(SVG_TRANSFORM_MATRIX);
52: super .setA(a);
53: }
54:
55: public void setB(float b) throws DOMException {
56: SVGOMTransform.this .setType(SVG_TRANSFORM_MATRIX);
57: super .setB(b);
58: }
59:
60: public void setC(float c) throws DOMException {
61: SVGOMTransform.this .setType(SVG_TRANSFORM_MATRIX);
62: super .setC(c);
63: }
64:
65: public void setD(float d) throws DOMException {
66: SVGOMTransform.this .setType(SVG_TRANSFORM_MATRIX);
67: super .setD(d);
68: }
69:
70: public void setE(float e) throws DOMException {
71: SVGOMTransform.this .setType(SVG_TRANSFORM_MATRIX);
72: super .setE(e);
73: }
74:
75: public void setF(float f) throws DOMException {
76: SVGOMTransform.this.setType(SVG_TRANSFORM_MATRIX);
77: super.setF(f);
78: }
79: };
80: }
81: }
|