/** * Converts an SWT transform into the equivalent AWT transform. * * @param swtTransform the SWT transform. * * @return The AWT transform. */ private AffineTransform toAwtTransform(Transform swtTransform) { float[] elements = new float[6]; swtTransform.getElements(elements); AffineTransform awtTransform = new AffineTransform(elements); return awtTransform; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString() { if (isDisposed()) return "Transform {*DISPOSED*}"; float[] elements = new float[6]; getElements(elements); return "Transform {" + elements [0] + "," + elements [1] + "," +elements [2] + "," +elements [3] + "," +elements [4] + "," +elements [5] + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ public String toString() { if (isDisposed()) return "Transform {*DISPOSED*}"; float[] elements = new float[6]; getElements(elements); return "Transform {" + elements [0] + ", " + elements [1] + ", " +elements [2] + ", " +elements [3] + ", " +elements [4] + ", " +elements [5] + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString() { if (isDisposed()) return "Transform {*DISPOSED*}"; float[] elements = new float[6]; getElements(elements); return "Transform {" + elements [0] + "," + elements [1] + "," +elements [2] + "," +elements [3] + "," +elements [4] + "," +elements [5] + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString() { if (isDisposed()) return "Transform {*DISPOSED*}"; float[] elements = new float[6]; getElements(elements); return "Transform {" + elements [0] + "," + elements [1] + "," +elements [2] + "," +elements [3] + "," +elements [4] + "," +elements [5] + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString() { if (isDisposed()) return "Transform {*DISPOSED*}"; float[] elements = new float[6]; getElements(elements); return "Transform {" + elements [0] + "," + elements [1] + "," +elements [2] + "," +elements [3] + "," +elements [4] + "," +elements [5] + "}"; }
/** * Returns <code>true</code> if the Transform represents the identity matrix * and false otherwise. * * @return <code>true</code> if the receiver is an identity Transform, and <code>false</code> otherwise */ public boolean isIdentity() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] m = new float[6]; getElements(m); return m[0] == 1 && m[1] == 0 && m[2] == 0 && m[3] == 1 && m[4] == 0 && m[5] == 0; }
/** * Returns <code>true</code> if the Transform represents the identity matrix * and false otherwise. * * @return <code>true</code> if the receiver is an identity Transform, and <code>false</code> otherwise */ public boolean isIdentity() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] m = new float[6]; getElements(m); return m[0] == 1 && m[1] == 0 && m[2] == 0 && m[3] == 1 && m[4] == 0 && m[5] == 0; }
/** * Returns <code>true</code> if the Transform represents the identity matrix * and false otherwise. * * @return <code>true</code> if the receiver is an identity Transform, and <code>false</code> otherwise */ public boolean isIdentity() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] m = new float[6]; getElements(m); return m[0] == 1 && m[1] == 0 && m[2] == 0 && m[3] == 1 && m[4] == 0 && m[5] == 0; }
delegate.setTransform( elements ); } else { transform.getElements( elements ); delegate.setTransform( elements );
matrix.getElements( elements ); multiply( elements[ 0 ], elements[ 1 ],