*
* @param awtTransform The AWT transform to convert.
* @return A SWT transform instance.
*/
private Transform getSwtTransformFromPool(AffineTransform awtTransform) {
Transform t = (Transform) this.transformsPool.get(awtTransform);
if (t == null) {
t = new Transform(this.gc.getDevice());
double[] matrix = new double[6];
awtTransform.getMatrix(matrix);
t.setElements((float) matrix[0], (float) matrix[1],
(float) matrix[2], (float) matrix[3],
(float) matrix[4], (float) matrix[5]);
addToResourcePool(t);
this.transformsPool.put(awtTransform, t);
}