quicktime.std.image
Class VectorStream

java.lang.Object
  |
  +--quicktime.QTObject
        |
        +--quicktime.util.QTHandleRef
              |
              +--quicktime.std.movies.AtomContainer
                    |
                    +--quicktime.std.image.VectorStream
All Implemented Interfaces:
quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, quicktime.jdirect.QuickTimeVRLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public class VectorStream
extends AtomContainer
implements quicktime.jdirect.QuickTimeLib, quicktime.jdirect.PrimitivesLib

This class represents a vector data stream for QuickTime Vector component. It holds a stream of Atoms which constructs the vector to be drawn. This class is used to add the data atoms which are either the paths or the attributes of the path. A ZeroAtom at the end of the stream marks the end of datastream. It should be noted that all the addAtom calls which need the data to be Endian flipped is done internally by the class, unless explicitly mentioned.


Fields inherited from interface quicktime.jdirect.QuickTimeLib
JDirect_MacOSX, libraryInstance, name
 
Fields inherited from interface quicktime.jdirect.QuickTimeVRLib
JDirect_MacOSX, libraryInstance
 
Constructor Summary
VectorStream(Curve c)
          Used to create an empty vector data stream.
 
Method Summary
 void addAtom(boolean onCurve, QDPoint[] points)
          Used to add an atom of type kCurvePathAtom to a vector data stream.
 void addAtom(int atomType, byte[] atomData)
          Used to add an atom to a vector data stream.
 void addAtom(int atomType, int atomData)
          Used to add an atom to a vector data stream.
 void addAtom(QDColor col)
          Used to add kCurveARGBColorAtom atom to a vector data stream.
 void addAtom(QDColor[] grColors)
          Used to add an atom of type kCurveGradientRecordAtom to a vector data stream.
 void addPathAtom(QTHandle pathData)
          Used to add a path to a vector data stream.
 void addZeroAtom()
          Used to add a kCurveEndAtom to a vector data stream.
 AtomData getAtomData(int atomType)
          This method is used to find the first atom of a specified type within a vector data stream and get its data.
 void removeAtom(int atomType)
          Used to remove and atom of given type ex.
 
Methods inherited from class quicktime.std.movies.AtomContainer
copyAtom, copyAtomDataToArray, copyAtomDataToHandle, copyAtomDataToPtr, countChildrenOfType, findChildByID_Atom, findChildByID_index, findChildByIndex_Atom, findChildByIndex_id, fromCompressionDialog, fromGraphicsExporter, fromGraphicsExporterCompressor, fromGraphicsExporterMIME, fromGraphicsImporterExportImage, fromGraphicsImporterExportSettings, fromGraphicsImporterMIME, fromMediaInput, fromMediaProperty, fromMovieExporter, fromMovieImporterMIME, fromMovieImporterSettings, fromQTHandle, fromQTVRInstanceNode, fromQTVRInstanceWorld, fromThreeDMediaHandlerObject, fromThreeDMediaHandlerRenderer, getAtomData, getAtomDataSize, getAtomID, getAtomType, getNextChildType, getParent, insertChild, insertChild, insertChild, insertChild, insertChild, insertChild, insertChild, insertChild, insertChildren, iTextAddString, iTextGetString, iTextRemoveString, nextChildAnyType, removeAtom, removeChildren, replaceAtom, setAtomData, setAtomData, setAtomData, setAtomData, setAtomData, setAtomData, setAtomData, setAtomID, swapAtoms
 
Methods inherited from class quicktime.util.QTHandleRef
copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, fromCompressionDialogState, fromSCSequence, getBytes, getSize, inMemory, isLocked, lock, lockHigh, moveHigh, toQTPointer, toQTPointer, toString, 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

VectorStream

public VectorStream(Curve c)
             throws QTException
Used to create an empty vector data stream.

QuickTime::CurveCreateVectorStream

Parameters:
c - the curve component
Method Detail

addPathAtom

public void addPathAtom(QTHandle pathData)
                 throws QTException
Used to add a path to a vector data stream.

QuickTime::CurveAddPathAtomToVectorStream

Parameters:
pathData - Contains a handle to the data for the path.

addZeroAtom

public void addZeroAtom()
                 throws StdQTException
Used to add a kCurveEndAtom to a vector data stream. This atom marks the end of the vector data stream.

QuickTime::CurveAddZeroAtomToVectorStream


addAtom

public void addAtom(int atomType,
                    byte[] atomData)
             throws StdQTException
Used to add an atom to a vector data stream. When using this call make sure that the byte array passed in has all its bytes flipped to BigEndian .

QuickTime::CurveAddAtomToVectorStream

Parameters:
atomType - Specifies the type of atom to add to the vector data stream.
atomData - the data for the atom.The EndianFlipping should be done by the application

addAtom

public void addAtom(QDColor col)
             throws QTException
Used to add kCurveARGBColorAtom atom to a vector data stream.

QuickTime::CurveAddAtomToVectorStream

Parameters:
col - Specifies the QDColor to be added.

addAtom

public void addAtom(int atomType,
                    int atomData)
             throws StdQTException
Used to add an atom to a vector data stream.

QuickTime::CurveAddAtomToVectorStream

Parameters:
atomType - Specifies the type of atom to add to the vector data stream.
atomData - the data for the atom.

addAtom

public void addAtom(boolean onCurve,
                    QDPoint[] points)
             throws StdQTException
Used to add an atom of type kCurvePathAtom to a vector data stream. By default this has one contour per path. This is used to add points that are all on curve or off curve.

QuickTime::CurveAddAtomToVectorStream

Parameters:
onCurve - if points are on curve set to true.
points - Specifies countour points that are to be added to the vector data stream.

addAtom

public void addAtom(QDColor[] grColors)
             throws QTException
Used to add an atom of type kCurveGradientRecordAtom to a vector data stream.

QuickTime::CurveAddAtomToVectorStream

Parameters:
points - Specifies GradientColorRecords that are to be added to the vector data stream.

removeAtom

public void removeAtom(int atomType)
                throws StdQTException
Used to remove and atom of given type ex. kCurveGradientRecordAtom can be disabled by making this call so that all atoms added after this atom do not have Gradient.

QuickTime::CurveAddAtomToVectorStream

Parameters:
atomType - contains the type of atom to be removed .

getAtomData

public AtomData getAtomData(int atomType)
                     throws QTException
This method is used to find the first atom of a specified type within a vector data stream and get its data.

QuickTime::CurveGetAtomDataFromVectorStream

Parameters:
vectorStream - Contains a handle to the vector data stream from which to get the atom.
atomType - Specifies the type of atom to find.
Returns:
the atom's data.