quicktime.qd
Class Polygon

java.lang.Object
  |
  +--quicktime.QTObject
        |
        +--quicktime.util.QTHandleRef
              |
              +--quicktime.qd.Polygon
All Implemented Interfaces:
java.lang.Cloneable, quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class Polygon
extends QTHandleRef
implements quicktime.jdirect.QuickTimeLib, java.lang.Cloneable

The Polygon represents an arbitary area or set of areas on the drawing coordinate plane. Methods are implemented for a corresponding QuickDraw structure used by QuickTime. refer to Polygon in QuickDraw


Fields inherited from interface quicktime.jdirect.QuickTimeLib
JDirect_MacOSX, libraryInstance, name
 
Constructor Summary
Polygon(QDGraphics g)
          Allocates a new empty Polygon.
 
Method Summary
 java.lang.Object clone()
          Copies the mathematical structure of the implicit Polygon into a newly created Polygon.
 void close()
          Completes the collection of lines that define the polygon.
 Polygon copy()
          Copies the mathematical structure of the implicit Polygon into a newly created Polygon.
 QDRect getBounds()
          Returns a copy of the bounding rectangle of the Polygon.
 QDRect getPolyBBox()
          Returns a copy of the bounding rectangle of the Polygon.
 int getSize()
          Returns size of the Polygon.
 void offset(int dh, int dv)
          offset moves the Polygon by adding the value you specify in the dh parameter to the horizontal coordinates of its points, and by adding the value you specify in the dv parameter to the vertical coordinates of all points of its boundary.
 java.lang.String toString()
          Print information about this object.
 
Methods inherited from class quicktime.util.QTHandleRef
copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, fromCompressionDialogState, fromSCSequence, getBytes, inMemory, isLocked, lock, lockHigh, moveHigh, toQTPointer, toQTPointer, unlock
 
Methods inherited from class quicktime.QTObject
disposeQTObject, equals, ID
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon(QDGraphics g)
        throws QTException
Allocates a new empty Polygon.

QuickDraw::OpenPoly
Parameters:
port - the port which the open polygon will record operations from
Method Detail

close

public void close()
           throws QDException
Completes the collection of lines that define the polygon.

QuickDraw::ClosePoly

getSize

public int getSize()
Returns size of the Polygon.
Overrides:
getSize in class QTHandleRef
Following copied from class: quicktime.util.QTHandleRef
Returns:
the size of the handle

getPolyBBox

public QDRect getPolyBBox()
Returns a copy of the bounding rectangle of the Polygon.
Returns:
a rect

getBounds

public QDRect getBounds()
Returns a copy of the bounding rectangle of the Polygon.
Returns:
a rect

copy

public Polygon copy()
             throws QTException
Copies the mathematical structure of the implicit Polygon into a newly created Polygon.
Returns:
A new Polygon copy.

clone

public java.lang.Object clone()
Copies the mathematical structure of the implicit Polygon into a newly created Polygon.
Returns:
A new Polygon copy.

toString

public java.lang.String toString()
Print information about this object.
Overrides:
toString in class QTHandleRef
Returns:
a string representing this Polygon object

offset

public void offset(int dh,
                   int dv)
            throws QDException
offset moves the Polygon by adding the value you specify in the dh parameter to the horizontal coordinates of its points, and by adding the value you specify in the dv parameter to the vertical coordinates of all points of its boundary. If the values of dh and dv are positive, the movement is to the right and down; if either is negative, the corresponding movement is in the opposite direction. The Polygon retains its size and shape. This doesnŐt affect the screen unless you subsequently redraw the polygon.

QuickDraw::OffsetPoly()

Parameters:
poly - Polygon to offset.
dh - The horizontal distance to move the polygon.
dv - The vertical distance to move the polygon.