diff options
author | Felipe Heidrich | 2008-03-11 16:58:17 +0000 |
---|---|---|
committer | Felipe Heidrich | 2008-03-11 16:58:17 +0000 |
commit | 8dbba434b33c2074b1db23c7d4671f71a47c1ff4 (patch) | |
tree | 81acd77432defbd6e48ef7c27ff8514edd1d2dd1 /bundles/org.eclipse.swt/Eclipse SWT/cairo | |
parent | 9513032bd178e047f8238dd7bd2a1528b58d9ef8 (diff) | |
download | eclipse.platform.swt-8dbba434b33c2074b1db23c7d4671f71a47c1ff4.tar.gz eclipse.platform.swt-8dbba434b33c2074b1db23c7d4671f71a47c1ff4.tar.xz eclipse.platform.swt-8dbba434b33c2074b1db23c7d4671f71a47c1ff4.zip |
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/cairo')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java index 9ef049cc99..2c1ad84ca3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java @@ -171,6 +171,11 @@ public void getElements(float[] elements) { elements[5] = (float)handle[5]; } +public void identity() { + if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); + Cairo.cairo_matrix_init(handle, 1, 0, 0, 1, 0, 0); +} + /** * Modifies the receiver such that the matrix it represents becomes the * the mathematical inverse of the matrix it previously represented. @@ -290,6 +295,12 @@ public void setElements(float m11, float m12, float m21, float m22, float dx, fl Cairo.cairo_matrix_init(handle, m11, m12, m21, m22, dx, dy); } +public void shear(float shearX, float shearY) { + if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); + double[] matrix = {1, shearX, shearY, 1, 0, 0}; + Cairo.cairo_matrix_multiply(handle, matrix, handle); +} + /** * Given an array containing points described by alternating x and y values, * modify that array such that each point has been replaced with the result of |