这个是java的quicktime for java 的详细使用文档

源代码在线查看: matrix.html

软件大小: 3122 K
上传用户: Rebecca_SYF
关键词: java quicktime for 文档
下载地址: 免注册下载 普通下载 VIP

相关代码

				





: Class  Matrix












  
      Overview 
      Package 
    Class 
      Use 
      Tree 
      Deprecated 
      Index 
      Help 
  









 PREV CLASS 
 NEXT CLASS

  FRAMES   
 NO FRAMES



  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD








quicktime.std.image

Class  Matrix

java.lang.Object
  |
  +--quicktime.util.QTByteObject
        |
        +--quicktime.std.image.Matrix


All Implemented Interfaces: java.lang.Cloneable, InterfaceLib, PrimitivesLib, QuickTimeLib, java.io.Serializable, SharedLibrary, com.apple.jdirect.SharedLibrary



public final class Matrixextends QTByteObjectimplements QuickTimeLib, java.lang.Cloneable


A Matrix defines how to map points from one coordinate space into another coordinate space.


See Also: Serialized Form












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




kNativeSize

public static final int kNativeSize

This is the size (the number of bytes) that are required for this class







Constructor Detail




Matrix

public Matrix()

Construct an instance of a Matrix, with default settings of the identity Matrix



Matrix

public 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.
Parameters:table - a 3x3 table of float values.





Matrix

public Matrix(QDPoint[] source,
              QDPoint[] dest)
       throws QTException

Construct a Matrix that is a delta matrix between
 the two sets of 4 points. This call is available only
 in QuickTime 4 or later. The resulting matrix can be concatenated 
 with the matrix from which the source points are derived
 to transform the display object to the destination area.
 QuickTime::QuadToQuadMatrix
Parameters: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




setTx

public void setTx(float tx)

Set the X axis translation by specified amount.



Parameters:tx - amount to set x-axis translation





getTx

public float getTx()

Gets the X axis translation amount.



Returns:x-axis translation





setTy

public void setTy(float ty)

Set the Y axis translation by specified amount.



Parameters:ty - amount to set y-axis translation





getTy

public float getTy()

Get the Y axis translation amount.



Returns:y-axis translation





setSx

public void setSx(float sx)

Set the X axis Scale by specified amount.



Parameters:sx - amount to set x-axis scale.





getSx

public float getSx()

Gets the X axis scale amount.



Returns:x-axis scale.





setSy

public void setSy(float sy)

Set the Y axis Scale by specified amount.



Parameters:sy - amount to set x-axis scale.





getSy

public float getSy()

Gets the Y axis scale amount.



Returns:Y-axis scale.





setB

public void setB(float b)

Set b by specified amount.



Parameters:b - amoutn specified.





getB

public float getB()

Gets the b value.



Returns:b value.





setU

public void setU(float u)

Set u by specified amount.



Parameters:u - amount specified.





getU

public float getU()

Gets the u value.



Returns:u value.





setC

public void setC(float c)

Set c by specified amount.



Parameters:c - amount specified.





getC

public float getC()

Gets the c value.



Returns:c value.





setV

public void setV(float v)

Set v by specified amount.



Parameters:v - amount specified.





getV

public float getV()

Gets the v value.



Returns:v value.





setW

public void setW(float w)

Set w by specified amount.



Parameters:w - amount specified.





getW

public float getW()

Gets the w value.



Returns:w value.





getType

public short getType()

Obtains information about the matrix.
	  QuickTime::GetMatrixType 



Returns:indicates the nature of the transformation defined by Matrix.





isIdentity

public boolean isIdentity()

Returns true if the matrix is an identity matrix otherwise false






setIdentity

public void setIdentity()

Set the contents of a matrix so that it performs no transformation.
	  QuickTime::SetIdentityMatrix 






translate

public void translate(float deltaH,
                      float deltaV)

add a translation value to a specified matrix.
	  QuickTime::TranslateMatrix 



Parameters: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.





rotate

public void rotate(float degrees,
                   float aboutX,
                   float aboutY)

modifies the contents of a matrix so that is defines a rotation operation.
	  QuickTime::RotateMatrix 



Parameters: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.





scale

public void scale(float scaleX,
                  float scaleY,
                  float aboutX,
                  float aboutY)

modifies the contents of a matrix so that it defines a scaling operation.
	  QuickTime::ScaleMatrix 



Parameters: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.





skew

public void skew(float skewX,
                 float skewY,
                 float aboutX,
                 float aboutY)

modifies the contents of a matrix so that it defines a skew transformation.
	  QuickTime::SkewMatrix 



Parameters: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.





inverse

public boolean inverse(Matrix mr)

creates a new matrix that is the inverse of a specified matrix.
	  QuickTime::InverseMatrix 



Parameters:mr - specifies the new inverse matrix.Returns:true if inverse matrix was created, else return false.





concat

public void concat(Matrix b)

Concatenates two matrices, combining the transformations described by both
 matrices into a single matrix.
	  QuickTime::ConcatMatrix 



Parameters:mr - the destination matrix.





transformDPoints

public void transformDPoints(QDPoint dpt)
                      throws QTException

Transforms a set of fixed points through a specified matrix.
	  QuickTime::TransformFixedPoints 



Parameters:dpts - a set of float points.





transformDPoints

public void transformDPoints(QDPoint[] dpts)
                      throws QTException

Transforms a set of fixed points through a specified matrix.
	  QuickTime::TransformFixedPoints 



Parameters:dpts - a set of float points.





transformPoints

public void transformPoints(QDPoint pt)
                     throws StdQTException

transforms a set of QuickDraw points through a specified matrix.
	  QuickTime::TransformPoints 



Parameters:pts - an array of Points.





transformPoints

public void transformPoints(QDPoint[] pts)
                     throws StdQTException

transforms a set of QuickDraw points through a specified matrix.
	  QuickTime::TransformPoints 



Parameters:pts - an array of Points.





transformDRect

public boolean transformDRect(QDRect r)
                       throws QTException

transforms the upper left and lower right points of a rectangle through a specified
 matrix. 
	  QuickTime::TransformFixedRect 



Parameters:r - the QDRect to be transformed.Returns:false if the transformation is other than scaling and translation.





transformDRect

public boolean transformDRect(QDRect r,
                              QDPoint[] points)
                       throws QTException

transforms the upper left and lower right points of a rectangle through a specified
 matrix. 
	  QuickTime::TransformFixedRect 



Parameters:r - the QDRect to be transformed.bound - an array of four float points.Returns:false if the transformation is other than scaling and translation.





transformRect

public boolean transformRect(QDRect r)
                      throws QTException

transforms the upper left and lower right points of a rectangle through a specified matrix.
	  QuickTime::TransformRect 



Parameters:r - the rectangle to be transformed.Returns:false if the transformation is other than scaling and translation.





transformRect

public boolean transformRect(QDRect r,
                             QDPoint[] points)
                      throws QTException

transforms the upper left and lower right points of a rectangle through a specified matrix.
	  QuickTime::TransformRect 



Parameters:r - the rectangle to be transformed.bounds - an array of four float points.Returns:false if the transformation is other than scaling and translation.





transformRgn

public void transformRgn(Region r)
                  throws StdQTException

applies a specified matrix to a region.
	  QuickTime::TransformRgn 



Parameters:r - the region to be transformed.





rect

public void rect(QDRect srcRect,
                 QDRect dstRect)

creates a matrix that performs a translate and scale operation as described by the relationship
 between two rectangles.
	  QuickTime::RectMatrix 



Parameters:srcRect - the source rectangle.dstRect - the destination rectangle.





map

public void map(QDRect fromRect,
                QDRect toRect)

alters an existing matrix so that it defines a transformation from one rectangle to
 another.
	  QuickTime::MapMatrix 



Parameters:fromRect - the source rectangle.toRect - the destination rectangle.





toString

public java.lang.String toString()

Prints the matrix.
Overrides:toString in class QTByteObject





copy

public Matrix copy()

copies the contents of the one matrix into another matrix.
	  QuickTime::CopyMatrix 



Returns:a clone Matrix.





clone

public java.lang.Object clone()

copies the contents of the one matrix into another matrix.
	  QuickTime::CopyMatrix 



Returns:a clone Matrix.





equals

public boolean equals(Matrix m)

Compares the contents of a matrix for Equality.
	  QuickTime::EqualMatrix 



Parameters:m - the Matrix you are testing for equality.Returns:a boolean of whether the matrices are equal.












  
      Overview 
      Package 
    Class 
      Use 
      Tree 
      Deprecated 
      Index 
      Help 
  









 PREV CLASS 
 NEXT CLASS

  FRAMES   
 NO FRAMES



  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD








			

相关资源