quicktime.std.movies.media
Class SpriteMediaHandler

java.lang.Object
  |
  +--quicktime.QTObject
        |
        +--quicktime.std.comp.ComponentIdentifier
              |
              +--quicktime.std.comp.Component
                    |
                    +--quicktime.std.movies.media.MediaHandler
                          |
                          +--quicktime.std.movies.media.VisualMediaHandler
                                |
                                +--quicktime.std.movies.media.SpriteMediaHandler
All Implemented Interfaces:
quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class SpriteMediaHandler
extends VisualMediaHandler
implements quicktime.jdirect.QuickTimeLib


Fields inherited from interface quicktime.jdirect.QuickTimeLib
JDirect_MacOSX, libraryInstance, name
 
Method Summary
 int countImages()
          This method returns the number of images contained in the image pool of this media.
 int countSprites()
          This method returns the number of sprites contained in the media.
 float getActionVariable(int variableID)
          Returns the value of the sprite track variable with specified ID.
 java.lang.String getActionVariableAsString(int variableID)
          Returns the value as String of the sprite track variable with specified ID.
 int getDisplayedSampleNumber()
          This method returns the sample number displayed currently.
 GraphicsMode getGraphicsMode(int spriteID)
          This method allows you to get the graphics mode property of a sprite.
 int getImageIndex(int spriteID)
          This method allows you to get the image index property of a sprite.
 java.lang.String getImageName(int imageIndex)
          Returns the name of the sprite with the specified ID.
 ImageDescription getIndImageDescription(int imageIndex)
          This method returns the image description for the image specified by the index.
 int getLayer(int spriteID)
          This method allows you to get the layer property of a sprite.
 Matrix getMatrix(int spriteID)
          This method allows you to get the matrix property of a sprite.
 int getSpriteImageGroupID(int imageIndex)
          Returns a propert value for the image specified by imageIndex.
 QDPoint getSpriteImageRegistrationPoint(int imageIndex)
          Returns a propert value for the image specified by imageIndex.
 java.lang.String getSpriteName(int spriteID)
          Returns the name of the sprite with the specified ID.
 boolean getVisible(int spriteID)
          This method allows you to get the visibility property of a sprite.
 int hitTestAllSprites(int flags, QDPoint loc)
          This method allows you to receive the index of the sprite which contains a specified point.
 boolean hitTestOneSprite(int spriteID, int flags, QDPoint loc)
          Perform hit testing on the sprite specified by loc.
 void setActionVariable(int variableID, float value)
          Sets the value of the sprite track variable with the ID of the variable to the supplied value.
 void setActionVariableToString(int variableID, java.lang.String theString)
          Sets the value of the sprite track variable with the ID of the variable to the supplied theString.
 void setGraphicsMode(int spriteID, GraphicsMode gMode)
          This method allows you to specify the graphics mode property of a sprite.
 void setImageIndex(int spriteID, int index)
          This method allows you to specify the image index property of a sprite.
 void setLayer(int spriteID, int layer)
          This method allows you to specify the layer property of a sprite.
 void setMatrix(int spriteID, Matrix matrix)
          This method allows you to specify the Matrix property of a sprite.
 void setVisible(int spriteID, boolean visible)
          This method allows you to specify the visibility property of a sprite.
 short spriteIDtoIndex(int spriteID)
          Return the index of the sprite specified by spriteID.
 int spriteIndexToID(int spriteIndex)
          Return the ID of the sprite specified by spriteIndex.
 
Methods inherited from class quicktime.std.movies.media.VisualMediaHandler
getGraphicsMode, getTrackOpaque, hitTestForTargetRefCon, hitTestTargetRefCon, setGraphicsMode
 
Methods inherited from class quicktime.std.comp.Component
count
 
Methods inherited from class quicktime.std.comp.ComponentIdentifier
find, find, getInfo, toString
 
Methods inherited from class quicktime.QTObject
disposeQTObject, equals, ID
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setMatrix

public void setMatrix(int spriteID,
                      Matrix matrix)
               throws StdQTException
This method allows you to specify the Matrix property of a sprite.

QuickTime::SpriteMediaSetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
matrix - Specifies the new matrix.

setVisible

public void setVisible(int spriteID,
                       boolean visible)
                throws StdQTException
This method allows you to specify the visibility property of a sprite.

QuickTime::SpriteMediaSetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
visible - Specifies the new visibility property.

setLayer

public void setLayer(int spriteID,
                     int layer)
              throws StdQTException
This method allows you to specify the layer property of a sprite.

QuickTime::SpriteMediaSetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
layer - Specifies the new layer property.

setGraphicsMode

public void setGraphicsMode(int spriteID,
                            GraphicsMode gMode)
                     throws StdQTException
This method allows you to specify the graphics mode property of a sprite.

QuickTime::SpriteMediaSetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
gMode - Specifies the new graphics mode property.

setImageIndex

public void setImageIndex(int spriteID,
                          int index)
                   throws StdQTException
This method allows you to specify the image index property of a sprite.

QuickTime::SpriteMediaSetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
index - Specifies the new image index property.

getMatrix

public Matrix getMatrix(int spriteID)
                 throws StdQTException
This method allows you to get the matrix property of a sprite.

QuickTime::SpriteMediaGetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
Returns:
the matrix property of the specified sprite.

getVisible

public boolean getVisible(int spriteID)
                   throws StdQTException
This method allows you to get the visibility property of a sprite.

QuickTime::SpriteMediaGetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
Returns:
the visibility property of the specified sprite.

getLayer

public int getLayer(int spriteID)
             throws StdQTException
This method allows you to get the layer property of a sprite.

QuickTime::SpriteMediaGetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
Returns:
the layer property of the specified sprite.

getGraphicsMode

public GraphicsMode getGraphicsMode(int spriteID)
                             throws StdQTException
This method allows you to get the graphics mode property of a sprite.

QuickTime::SpriteMediaGetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
Returns:
the graphics mode property of the specified sprite.

getImageIndex

public int getImageIndex(int spriteID)
                  throws StdQTException
This method allows you to get the image index property of a sprite.

QuickTime::SpriteMediaGetSpriteProperty()

Parameters:
spriteID - Specifies the sprite ID.
Returns:
the image index property of the specified sprite.

hitTestAllSprites

public int hitTestAllSprites(int flags,
                             QDPoint loc)
                      throws StdQTException
This method allows you to receive the index of the sprite which contains a specified point.

QuickTime::SpriteMediaHitTestAllSprites()

Parameters:
flags - Controls the operation of this method.
loc - Specifies the point for hit test.
Returns:
the ID of the sprite which contains the point.

hitTestOneSprite

public boolean hitTestOneSprite(int spriteID,
                                int flags,
                                QDPoint loc)
                         throws StdQTException
Perform hit testing on the sprite specified by loc.

QuickTime::SpriteMediaHitTestOneSprite()

Parameters:
spriteID - Specifies the sprite ID.
flags - specifies how to control the hit testing operation
loc - Specifies the point for hit test.
Returns:
true or false if the loc matches that of the sprite.

countSprites

public int countSprites()
                 throws StdQTException
This method returns the number of sprites contained in the media.

QuickTime::SpriteMediaCountSprites()

Returns:
the number of sprites contained in the media.

countImages

public int countImages()
                throws StdQTException
This method returns the number of images contained in the image pool of this media.

QuickTime::SpriteMediaCountImages()

Returns:
the number of images.

getIndImageDescription

public ImageDescription getIndImageDescription(int imageIndex)
                                        throws QTException
This method returns the image description for the image specified by the index.

QuickTime::SpriteMediaGetIndImageDescription()

Parameters:
imageIndex - Specifies the image index.
Returns:
the image description for the image specified by the index.

getDisplayedSampleNumber

public int getDisplayedSampleNumber()
                             throws StdQTException
This method returns the sample number displayed currently.

QuickTime::SpriteMediaGetDisplayedSampleNumber()

Returns:
the sample number displayed currently.

getSpriteName

public java.lang.String getSpriteName(int spriteID)
                               throws StdQTException
Returns the name of the sprite with the specified ID.

QuickTime::SpriteMediaGetSpriteName()

Parameters:
spriteID - Specifies the id of the sprite in question.
Returns:
the sprite name for a given sprite ID.

getImageName

public java.lang.String getImageName(int imageIndex)
                              throws StdQTException
Returns the name of the sprite with the specified ID.

QuickTime::SpriteMediaGetImageName()

Parameters:
imageIndex - Specifies the index of the image whose name we wish to receive.
Returns:
the name of the image with the specified index from the current key frame sample.

spriteIndexToID

public int spriteIndexToID(int spriteIndex)
                    throws StdQTException
Return the ID of the sprite specified by spriteIndex.

QuickTime::SpriteMediaSpriteIndexToID()

Parameters:
spriteIndex - Specifies the index of the sprite for the operation.
Returns:
sprite ID of the sprite Index.

spriteIDtoIndex

public short spriteIDtoIndex(int spriteID)
                      throws StdQTException
Return the index of the sprite specified by spriteID.

QuickTime::SpriteMediaSpriteIDToIndex()

Parameters:
spriteID - Specifies the ID of the sprite for the operation.
Returns:
sprite ID of the sprite Index.

setActionVariable

public void setActionVariable(int variableID,
                              float value)
                       throws StdQTException
Sets the value of the sprite track variable with the ID of the variable to the supplied value.

QuickTime::SpriteMediaSetActionVariable()

Parameters:
variableID - Specifies a variable ID of the sprite name.

getActionVariable

public float getActionVariable(int variableID)
                        throws StdQTException
Returns the value of the sprite track variable with specified ID.

QuickTime::SpriteMediaGetActionVariable()

Parameters:
variableID - Specifies a variable ID of the sprite name.

setActionVariableToString

public void setActionVariableToString(int variableID,
                                      java.lang.String theString)
                               throws StdQTException
Sets the value of the sprite track variable with the ID of the variable to the supplied theString.

QuickTime::SpriteMediaSetActionVariableToString()

Parameters:
variableID - Specifies a variable ID of the sprite name.
theString - Specifies the string value of the variableID.

getActionVariableAsString

public java.lang.String getActionVariableAsString(int variableID)
                                           throws StdQTException
Returns the value as String of the sprite track variable with specified ID.

QuickTime::SpriteMediaGetActionVariableAsString()

Parameters:
variableID - Specifies a variable ID of the sprite name.
Returns:
the string value of the variableID sprite track

getSpriteImageGroupID

public int getSpriteImageGroupID(int imageIndex)
                          throws StdQTException
Returns a propert value for the image specified by imageIndex.

QuickTime::SpriteMediaGetIndImageProperty()

Parameters:
imageIndex - Specifies the index of the image.

getSpriteImageRegistrationPoint

public QDPoint getSpriteImageRegistrationPoint(int imageIndex)
                                        throws StdQTException
Returns a propert value for the image specified by imageIndex.

QuickTime::SpriteMediaGetIndImageProperty()

Parameters:
imageIndex - Specifies the index of the image.