All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.qd.QDPoint

java.lang.Object
   |
   +----quicktime.qd.QDPoint

public final class QDPoint
extends Object
implements PrimitivesLib, Cloneable

Variable Index

 o kIsFixedPoint
These constants are used in the fromArray call to indicate which of the 2 formats the byte array is encoded in.
 o kIsGXPoint
These constants are used in the fromArray call to indicate which of the 2 formats the byte array is encoded in.
 o kIsQ3Point2D
These constants are used in the fromArray call to indicate which of the 2 formats the byte array is encoded in.
 o kIsQTVRFloatPoint
These constants are used in the fromArray call to indicate which of the 2 formats the byte array is encoded in.

Constructor Index

 o QDPoint(float, float)
Create a QDPoint at specified location
 o QDPoint(int, int)
Create a QDPoint at specified location
 o QDPoint(Point)
Create a QDPoint at specified location

Method Index

 o clone()
Return a copy of the QDPoint
 o copy()
Returns a copy of the QDPoint with the correct return type.
 o equals(Object)
Checks whether two int points are equal.
 o fromArray(byte[], int)
Creates a QDPoint from an array of bytes that represent a FixedPoint, so the byte array must be 8bytes long at least.
 o fromArray(byte[], int, int)
Creates a QDPoint from an array of bytes that represent a FixedPoint, so the byte array must be 8bytes long at least.
 o getEndianDescriptorFixedPoint()
Returns the EndianDescriptor for FixedPoint point.
 o getEndianDescriptorQTVRFloatPoint()
Returns the EndianDescriptor for TQ3Point2D point.
 o getEndianDescriptorTQ3Point2D()
Returns the EndianDescriptor for TQ3Point2D point.
 o getFixedPoint()
Returns a byte array that contains the packed value of a FixedPoint
 o getGXPoint()
Returns a byte array that contains the packed value of a GXPoint
 o getPoint()
Returns the QDPoint packed into a 32bit integer
 o getQ3Point2D()
Returns a byte array that contains the packed value of a 3Point2D
 o getQTVRFloatPoint()
Returns a byte array that contains the packed value of a QTVRFloatPoint
 o getX()
Get the x location of the point.
 o getXF()
Get the x location of the point.
 o getY()
Get the y location of the point.
 o getYF()
Get the y location of the point.
 o move(float, float)
Moves the point, to coordinates x, y.
 o move(int, int)
Moves the point, to coordinates x, y.
 o setX(float)
Set the x location of the point.
 o setX(int)
Set the x location of the point.
 o setY(float)
Set the y location of the point.
 o setY(int)
Set the y location of the point.
 o toPoint()
Convert to java.awt.Point
 o toString()
Returns the String representation of this QDPoint's coordinate.
 o translate(float, float)
Translates the point, by deltaX and deltaY.
 o translate(int, int)
Translates the point, by deltaX and deltaY.

Variables

 o kIsFixedPoint
 public static final int kIsFixedPoint
These constants are used in the fromArray call to indicate which of the 2 formats the byte array is encoded in.

 o kIsGXPoint
 public static final int kIsGXPoint
These constants are used in the fromArray call to indicate which of the 2 formats the byte array is encoded in.

 o kIsQ3Point2D
 public static final int kIsQ3Point2D
These constants are used in the fromArray call to indicate which of the 2 formats the byte array is encoded in.

 o kIsQTVRFloatPoint
 public static final int kIsQTVRFloatPoint
These constants are used in the fromArray call to indicate which of the 2 formats the byte array is encoded in.

Constructors

 o QDPoint
 public QDPoint(int x,
                int y)
Create a QDPoint at specified location

Parameters:
x - x location
y - y location
 o QDPoint
 public QDPoint(float x,
                float y)
Create a QDPoint at specified location

Parameters:
x - x location
y - y location
 o QDPoint
 public QDPoint(Point origin)
Create a QDPoint at specified location

Parameters:
point - location of point

Methods

 o getEndianDescriptorFixedPoint
 public static final EndianDescriptor getEndianDescriptorFixedPoint()
Returns the EndianDescriptor for FixedPoint point.

Returns:
an EndianDescriptor
 o getEndianDescriptorTQ3Point2D
 public static final EndianDescriptor getEndianDescriptorTQ3Point2D()
Returns the EndianDescriptor for TQ3Point2D point.

Returns:
an EndianDescriptor
 o getEndianDescriptorQTVRFloatPoint
 public static final EndianDescriptor getEndianDescriptorQTVRFloatPoint()
Returns the EndianDescriptor for TQ3Point2D point.

Returns:
an EndianDescriptor
 o fromArray
 public static QDPoint fromArray(byte ptBytes[],
                                 int ptType)
Creates a QDPoint from an array of bytes that represent a FixedPoint, so the byte array must be 8bytes long at least.

Parameters:
ptBytes - the byte array containing the packed point values
ptType - the type of point to be found in the array
Returns:
a QDPoint
Throws: IllegalArgumentException
if mismatch between minimum length of byte array and format flag
 o fromArray
 public static QDPoint fromArray(byte ptBytes[],
                                 int ptType,
                                 int offset)
Creates a QDPoint from an array of bytes that represent a FixedPoint, so the byte array must be 8bytes long at least.

Parameters:
ptBytes - the byte array containing the packed point values
ptType - the type of point to be found in the array
offset - the offset in the array where the point is to be found
Returns:
a QDPoint
Throws: IllegalArgumentException
if mismatch between minimum length of byte array and format flag
 o getPoint
 public int getPoint()
Returns the QDPoint packed into a 32bit integer

 o getGXPoint
 public byte[] getGXPoint()
Returns a byte array that contains the packed value of a GXPoint

 o getFixedPoint
 public byte[] getFixedPoint()
Returns a byte array that contains the packed value of a FixedPoint

 o getQ3Point2D
 public byte[] getQ3Point2D()
Returns a byte array that contains the packed value of a 3Point2D

 o getQTVRFloatPoint
 public byte[] getQTVRFloatPoint()
Returns a byte array that contains the packed value of a QTVRFloatPoint

 o getX
 public int getX()
Get the x location of the point.

Returns:
the current x location
 o getXF
 public float getXF()
Get the x location of the point.

Returns:
the current x location
 o setX
 public void setX(int x)
Set the x location of the point.

Parameters:
x - the new x location
 o setX
 public void setX(float x)
Set the x location of the point.

Parameters:
x - the new x location
 o getY
 public int getY()
Get the y location of the point.

Returns:
the current y location
 o getYF
 public float getYF()
Get the y location of the point.

Returns:
the current y location
 o setY
 public void setY(int y)
Set the y location of the point.

Parameters:
y - the new y location
 o setY
 public void setY(float y)
Set the y location of the point.

Parameters:
y - the new y location
 o translate
 public void translate(int deltaX,
                       int deltaY)
Translates the point, by deltaX and deltaY.

 o translate
 public void translate(float deltaX,
                       float deltaY)
Translates the point, by deltaX and deltaY.

 o move
 public void move(int x,
                  int y)
Moves the point, to coordinates x, y.

 o move
 public void move(float x,
                  float y)
Moves the point, to coordinates x, y.

 o equals
 public boolean equals(Object obj)
Checks whether two int points are equal.

Overrides:
equals in class Object
 o toString
 public String toString()
Returns the String representation of this QDPoint's coordinate.

Overrides:
toString in class Object
 o toPoint
 public Point toPoint()
Convert to java.awt.Point

 o clone
 public Object clone()
Return a copy of the QDPoint

Returns:
a QDPoint
Overrides:
clone in class Object
 o copy
 public QDPoint copy()
Returns a copy of the QDPoint with the correct return type.

Returns:
a QDPoint

All Packages  Class Hierarchy  This Package  Previous  Next  Index