|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--quicktime.util.QTByteObject | +--quicktime.std.image.Matrix
A Matrix defines how to map points from one coordinate space into another coordinate space.
| Field Summary | |
static int |
kNativeSize
This is the size (the number of bytes) that are required for this class |
| Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
| Constructor Summary | |
Matrix()
Construct an instance of a Matrix, with default settings of the identity Matrix |
|
Matrix(float[][] table)
Construct an instance of a Matrix from the values of a float[][], which is a 3x3 table, - an array of row values. |
|
Matrix(QDPoint[] source,
QDPoint[] dest)
Construct a Matrix that is a delta matrix between the two sets of 4 points. |
|
| Method Summary | |
java.lang.Object |
clone()
copies the contents of the one matrix into another matrix. |
void |
concat(Matrix b)
Concatenates two matrices, combining the transformations described by both matrices into a single matrix. |
Matrix |
copy()
copies the contents of the one matrix into another matrix. |
boolean |
equals(Matrix m)
Compares the contents of a matrix for Equality. |
float |
getB()
Gets the b value. |
float |
getC()
Gets the c value. |
float |
getSx()
Gets the X axis scale amount. |
float |
getSy()
Gets the Y axis scale amount. |
float |
getTx()
Gets the X axis translation amount. |
float |
getTy()
Get the Y axis translation amount. |
short |
getType()
Obtains information about the matrix. |
float |
getU()
Gets the u value. |
float |
getV()
Gets the v value. |
float |
getW()
Gets the w value. |
boolean |
inverse(Matrix mr)
creates a new matrix that is the inverse of a specified matrix. |
boolean |
isIdentity()
Returns true if the matrix is an identity matrix otherwise false |
void |
map(QDRect fromRect,
QDRect toRect)
alters an existing matrix so that it defines a transformation from one rectangle to another. |
void |
rect(QDRect srcRect,
QDRect dstRect)
creates a matrix that performs a translate and scale operation as described by the relationship between two rectangles. |
void |
rotate(float degrees,
float aboutX,
float aboutY)
modifies the contents of a matrix so that is defines a rotation operation. |
void |
scale(float scaleX,
float scaleY,
float aboutX,
float aboutY)
modifies the contents of a matrix so that it defines a scaling operation. |
void |
setB(float b)
Set b by specified amount. |
void |
setC(float c)
Set c by specified amount. |
void |
setIdentity()
Set the contents of a matrix so that it performs no transformation. |
void |
setSx(float sx)
Set the X axis Scale by specified amount. |
void |
setSy(float sy)
Set the Y axis Scale by specified amount. |
void |
setTx(float tx)
Set the X axis translation by specified amount. |
void |
setTy(float ty)
Set the Y axis translation by specified amount. |
void |
setU(float u)
Set u by specified amount. |
void |
setV(float v)
Set v by specified amount. |
void |
setW(float w)
Set w by specified amount. |
void |
skew(float skewX,
float skewY,
float aboutX,
float aboutY)
modifies the contents of a matrix so that it defines a skew transformation. |
java.lang.String |
toString()
Prints the matrix. |
void |
transformDPoints(QDPoint dpt)
Transforms a set of fixed points through a specified matrix. |
void |
transformDPoints(QDPoint[] dpts)
Transforms a set of fixed points through a specified matrix. |
boolean |
transformDRect(QDRect r)
transforms the upper left and lower right points of a rectangle through a specified matrix. |
boolean |
transformDRect(QDRect r,
QDPoint[] points)
transforms the upper left and lower right points of a rectangle through a specified matrix. |
void |
transformPoints(QDPoint pt)
transforms a set of QuickDraw points through a specified matrix. |
void |
transformPoints(QDPoint[] pts)
transforms a set of QuickDraw points through a specified matrix. |
boolean |
transformRect(QDRect r)
transforms the upper left and lower right points of a rectangle through a specified matrix. |
boolean |
transformRect(QDRect r,
QDPoint[] points)
transforms the upper left and lower right points of a rectangle through a specified matrix. |
void |
transformRgn(Region r)
applies a specified matrix to a region. |
void |
translate(float deltaH,
float deltaV)
add a translation value to a specified matrix. |
| Methods inherited from class quicktime.util.QTByteObject |
equals, fromArray, getBytes, getSize |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int kNativeSize
| Constructor Detail |
public Matrix()
public Matrix(float[][] table)
table - a 3x3 table of float values.public Matrix(QDPoint[] source, QDPoint[] dest) throws QTException
source - a set of 4 points t,l t,r b,r and b,l that describes the source areadest - a set of 4 points t,l t,r b,r and b,l that describes the destination area| Method Detail |
public void setTx(float tx)
tx - amount to set x-axis translationpublic float getTx()
public void setTy(float ty)
ty - amount to set y-axis translationpublic float getTy()
public void setSx(float sx)
sx - amount to set x-axis scale.public float getSx()
public void setSy(float sy)
sy - amount to set x-axis scale.public float getSy()
public void setB(float b)
b - amoutn specified.public float getB()
public void setU(float u)
u - amount specified.public float getU()
public void setC(float c)
c - amount specified.public float getC()
public void setV(float v)
v - amount specified.public float getV()
public void setW(float w)
w - amount specified.public float getW()
public short getType()
public boolean isIdentity()
public void setIdentity()
public void translate(float deltaH, float deltaV)
deltaH - specifies the value to be added to the x coordinate translation value.dletaV - specifies the value to be added to the y coordinate translation value.public void rotate(float degrees, float aboutX, float aboutY)
degrees - specifies the number of degrees of rotation.aboutX - specifies the x coordinate of the anchor point of rotation.aboutY - specifies the y coordinate of the anchor point of rotation.public void scale(float scaleX, float scaleY, float aboutX, float aboutY)
scaleX - specifies the scaling factor applied to x coordinates.scaleY - specifies the scaling factor applied to y coordinates.aboutX - specifies the x coordinate of the anchor point.aboutY - specifies the y coordinate of the anchor point.public void skew(float skewX, float skewY, float aboutX, float aboutY)
skewX - specifies the skew value to be applied to x coordinate.skewY - specifies the skew value to be applied to y coordinate.aboutX - specifies the x coordinate of the anchor point.aboutY - specifies the y coordinate of the anchor point.public boolean inverse(Matrix mr)
mr - specifies the new inverse matrix.public void concat(Matrix b)
mr - the destination matrix.public void transformDPoints(QDPoint dpt) throws QTException
dpts - a set of float points.public void transformDPoints(QDPoint[] dpts) throws QTException
dpts - a set of float points.public void transformPoints(QDPoint pt) throws StdQTException
pts - an array of Points.public void transformPoints(QDPoint[] pts) throws StdQTException
pts - an array of Points.public boolean transformDRect(QDRect r) throws QTException
r - the QDRect to be transformed.public boolean transformDRect(QDRect r, QDPoint[] points) throws QTException
r - the QDRect to be transformed.bound - an array of four float points.public boolean transformRect(QDRect r) throws QTException
r - the rectangle to be transformed.public boolean transformRect(QDRect r, QDPoint[] points) throws QTException
r - the rectangle to be transformed.bounds - an array of four float points.public void transformRgn(Region r) throws StdQTException
r - the region to be transformed.public void rect(QDRect srcRect, QDRect dstRect)
srcRect - the source rectangle.dstRect - the destination rectangle.public void map(QDRect fromRect, QDRect toRect)
fromRect - the source rectangle.toRect - the destination rectangle.public java.lang.String toString()
toString in class QTByteObjectpublic Matrix copy()
public java.lang.Object clone()
public boolean equals(Matrix m)
m - the Matrix you are testing for equality.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||