Application code must explicitly invoke the Transform.dispose()
method to release the operating system resources managed by each instance
when those instances are no longer required.
This class requires the operating system's advanced graphics subsystem which may not be available on some platforms.
| Modifier and Type | Field and Description |
|---|---|
| public double[] | handle
the OS resource for the Transform (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | Transform(Device
the device on which to allocate the Transform device, float the first element of the first row of the matrix m11, float the second element of the first row of the matrix m12, float the first element of the second row of the matrix m21, float the second element of the second row of the matrix m22, float the third element of the first row of the matrix dx, float the third element of the second row of the matrix dy)Constructs a new Transform given all of the elements that represent the matrix that describes the transformation. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static float[] | |
| pack-priv void | |
| public void | getElements(float[]
array to hold the matrix values elements)Fills the parameter with the values of the transformation matrix that the receiver represents, in the order {m11, m12, m21, m22, dx, dy}. |
| public void | |
| public void | invert()
Modifies the receiver such that the matrix it represents becomes the mathematical inverse of the matrix it previously represented. |
| public boolean | Returns: true when the Transform is disposed, and false otherwiseImplements abstract org. true if the Transform has been disposed,
and false otherwise.
|
| public boolean | Returns: true if the receiver is an identity Transform, and false otherwiseReturns |
| public void | |
| public void | rotate(float
the angle to rotate the transformation by angle)Modifies the receiver so that it represents a transformation that is equivalent to its previous transformation rotated by the specified angle. |
| public void | scale(float
the amount to scale in the X direction scaleX, float the amount to scale in the Y direction scaleY)Modifies the receiver so that it represents a transformation that is equivalent to its previous transformation scaled by (scaleX, scaleY). |
| public void | setElements(float
the first element of the first row of the matrix m11, float the second element of the first row of the matrix m12, float the first element of the second row of the matrix m21, float the second element of the second row of the matrix m22, float the third element of the first row of the matrix dx, float the third element of the second row of the matrix dy)Modifies the receiver to represent a new transformation given all of the elements that represent the matrix that describes that transformation. |
| public void | shear(float
the shear factor in the X direction shearX, float the shear factor in the Y direction shearY)Modifies the receiver so that it represents a transformation that is equivalent to its previous transformation sheared by (shearX, shearY). |
| public String | Returns: a string representation of the receiverOverrides java. |
| public void | transform(float[]
an array of alternating x and y values to be transformed pointArray)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 applying the transformation represented by the receiver to that point. |
| public void | translate(float
the distance to translate in the X direction offsetX, float the distance to translate in the Y direction offsetY)Modifies the receiver so that it represents a transformation that is equivalent to its previous transformation translated by (offsetX, offsetY). |
| handle | back to summary |
|---|---|
| public double[] handle the OS resource for the Transform (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms and should never be accessed from application code. | |
| Transform | back to summary |
|---|---|
| public Transform(Device device) Constructs a new identity Transform. This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the transform when it is no longer required.
| |
| Transform | back to summary |
|---|---|
| public Transform(Device device, float[] elements) Constructs a new Transform given an array of elements that represent the matrix that describes the transformation. This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the transform when it is no longer required.
| |
| Transform | back to summary |
|---|---|
| public Transform(Device device, float m11, float m12, float m21, float m22, float dx, float dy) Constructs a new Transform given all of the elements that represent the matrix that describes the transformation. This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the transform when it is no longer required.
| |
| checkTransform | back to summary |
|---|---|
| pack-priv static float[] checkTransform(float[] elements) | |
| destroy | back to summary |
|---|---|
| pack-priv void destroy() Overrides org.
| |
| getElements | back to summary |
|---|---|
| public void getElements(float[] elements) Fills the parameter with the values of the transformation matrix that the receiver represents, in the order {m11, m12, m21, m22, dx, dy}.
| |
| identity | back to summary |
|---|---|
| public void identity() Modifies the receiver such that the matrix it represents becomes the identity matrix.
| |
| invert | back to summary |
|---|---|
| public void invert() Modifies the receiver such that the matrix it represents becomes the mathematical inverse of the matrix it previously represented.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements abstract org. Returns
This method gets the dispose state for the Transform.
When a Transform has been disposed, it is an error to
invoke any other method (except
| |
| isIdentity | back to summary |
|---|---|
| public boolean isIdentity() Returns
| |
| multiply | back to summary |
|---|---|
| public void multiply(Transform matrix) Modifies the receiver such that the matrix it represents becomes the the result of multiplying the matrix it previously represented by the argument.
| |
| rotate | back to summary |
|---|---|
| public void rotate(float angle) Modifies the receiver so that it represents a transformation that is equivalent to its previous transformation rotated by the specified angle. The angle is specified in degrees and for the identity transform 0 degrees is at the 3 o'clock position. A positive value indicates a clockwise rotation while a negative value indicates a counter-clockwise rotation.
| |
| scale | back to summary |
|---|---|
| public void scale(float scaleX, float scaleY) Modifies the receiver so that it represents a transformation that is equivalent to its previous transformation scaled by (scaleX, scaleY).
| |
| setElements | back to summary |
|---|---|
| public void setElements(float m11, float m12, float m21, float m22, float dx, float dy) Modifies the receiver to represent a new transformation given all of the elements that represent the matrix that describes that transformation.
| |
| shear | back to summary |
|---|---|
| public void shear(float shearX, float shearY) Modifies the receiver so that it represents a transformation that is equivalent to its previous transformation sheared by (shearX, shearY).
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |
| transform | back to summary |
|---|---|
| public void transform(float[] pointArray) 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 applying the transformation represented by the receiver to that point.
| |
| translate | back to summary |
|---|---|
| public void translate(float offsetX, float offsetY) Modifies the receiver so that it represents a transformation that is equivalent to its previous transformation translated by (offsetX, offsetY).
| |