1 /*******************************************************************************
2 * Copyright (c) 2012 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.scenegraph.g2d;
14 import java.awt.geom.AffineTransform;
15 import java.awt.geom.NoninvertibleTransformException;
18 * An optimization for memory consumption to keep down the allocation of
19 * unnecessary identity-type affine transforms. This will be used as the default
20 * affine transform in {@link G2DNode} and {@link G2DParentNode}.
22 * @author Tuukka Lehtonen
24 public class IdentityAffineTransform extends AffineTransform {
26 public static final IdentityAffineTransform INSTANCE = new IdentityAffineTransform();
28 private static final long serialVersionUID = 7843049586639496587L;
30 private IdentityAffineTransform() {
31 // No self-construction.
35 public boolean isIdentity() {
40 public void translate(double tx, double ty) {
41 throw new UnsupportedOperationException();
45 public void rotate(double theta) {
46 throw new UnsupportedOperationException();
50 public void rotate(double theta, double anchorx, double anchory) {
51 throw new UnsupportedOperationException();
55 public void rotate(double vecx, double vecy) {
56 throw new UnsupportedOperationException();
60 public void rotate(double vecx, double vecy, double anchorx, double anchory) {
61 throw new UnsupportedOperationException();
65 public void quadrantRotate(int numquadrants) {
66 throw new UnsupportedOperationException();
70 public void quadrantRotate(int numquadrants, double anchorx, double anchory) {
71 throw new UnsupportedOperationException();
75 public void scale(double sx, double sy) {
76 throw new UnsupportedOperationException();
80 public void shear(double shx, double shy) {
81 throw new UnsupportedOperationException();
85 public void setToIdentity() {
90 public void setToTranslation(double tx, double ty) {
91 throw new UnsupportedOperationException();
95 public void setToRotation(double theta) {
96 throw new UnsupportedOperationException();
100 public void setToRotation(double theta, double anchorx, double anchory) {
101 throw new UnsupportedOperationException();
105 public void setToRotation(double vecx, double vecy) {
106 throw new UnsupportedOperationException();
110 public void setToRotation(double vecx, double vecy, double anchorx, double anchory) {
111 throw new UnsupportedOperationException();
115 public void setToQuadrantRotation(int numquadrants) {
116 throw new UnsupportedOperationException();
120 public void setToQuadrantRotation(int numquadrants, double anchorx, double anchory) {
121 throw new UnsupportedOperationException();
125 public void setToScale(double sx, double sy) {
126 throw new UnsupportedOperationException();
130 public void setToShear(double shx, double shy) {
131 throw new UnsupportedOperationException();
135 public void setTransform(AffineTransform Tx) {
136 throw new UnsupportedOperationException();
140 public void setTransform(double m00, double m10, double m01, double m11, double m02, double m12) {
141 throw new UnsupportedOperationException();
145 public void concatenate(AffineTransform Tx) {
146 throw new UnsupportedOperationException();
150 public void preConcatenate(AffineTransform Tx) {
151 throw new UnsupportedOperationException();
155 public void invert() throws NoninvertibleTransformException {
156 throw new UnsupportedOperationException();
160 public Object clone() {
161 return new AffineTransform();