Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.std.anim
Class Sprite

    java.lang.Object
      |
      +--quicktime.QTObject
            |
            +--quicktime.std.anim.Sprite

All Implemented Interfaces:
  quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, com.apple.jdirect.SharedLibrary, quicktime.jdirect.SharedLibrary

public final class Sprite
extends QTObject
implements quicktime.jdirect.QuickTimeLib, quicktime.jdirect.PrimitivesLib

The Sprite class implements the corresponding data structure of the Movie Toolbox.

Fields inherited from interface quicktime.jdirect.QuickTimeLib
`JDirect_MacOSX, libraryInstance, name`

Constructor Summary
`Sprite(SpriteWorld itsSpriteWorld, ImageDescription idh, EncodedImage imageData, Matrix matrix, boolean visible, int layer)` This constructor creates a new Sprite object for a specified sprite world.

Method Summary
`GraphicsMode` | `getGraphicsMode()` This method gets the graphics mode property of this sprite.
`RawEncodedImage` | `getImageData()` This method gets the image data property of this sprite.
`int` | `getImageDataSize()` This method gets the size of the image data that a sprite is currently displaying.
`ImageDescription` | `getImageDescription()` This method gets the image description property of this sprite.
`java.awt.Dimension` | `getInitialSize()` Deprecated. since QTJava 4.0
`int` | `getLayer()` This method gets the layer property of this sprite.
`Matrix` | `getMatrix()` This method gets the matrix property of this sprite.
`QDDimension` | `getOriginalSize()` This method returns the original width and height of the image currently being presented by the sprite.
`SpriteWorld` | `getSpriteWorld()` Return the sprite world that this sprite belongs too
`boolean` | `getVisible()` This method gets the visibility property of this sprite.
`boolean` | `hitTest(int flags, QDPoint loc)` This method tests if a point is inside a sprite.
`void` | `invalidate()` This method invalidates the portion of the sprite's sprite world which is occupied by the sprite.
`void` | `remove()` This will remove the sprite from the SpriteWorld it is contained in and destroy its internal structures.
`void` | `setGraphicsMode(GraphicsMode gMode)` This method sets the graphics mode property of this sprite.
`void` | `setImageData(EncodedImage data)` This method sets the image data property of this sprite.
`boolean` | `setImageDataIfDifferent(EncodedImage data)` This method sets the image data property of this sprite.
`void` | `setImageDataSize(int size)` This method sets the size of the image data that the sprite is currently displaying.
`void` | `setImageDescription(ImageDescription idh)` This method sets the image description property of this sprite.
`void` | `setLayer(int layer)` This method sets the layer property of this sprite.
`void` | `setMatrix(Matrix matrix)` This method sets the matrix property of this sprite.
`void` | `setVisible(boolean visible)` This method sets the visibility property of this sprite.

Methods inherited from class quicktime.QTObject
`disposeQTObject, equals, ID, toString`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Sprite

    public Sprite(SpriteWorld itsSpriteWorld,
                  ImageDescription idh,
                  EncodedImage imageData,
                  Matrix matrix,
                  boolean visible,
                  int layer)
           throws QTException

  This constructor creates a new Sprite object for a specified sprite world.
  QuickTime::NewSprite()
Parameters:
  `itsSpriteWorld` - Specifies the sprite world.
  `idh` - an ImageDescription object that describes the image.
  `imageData` - Contains the sprite's image data.
  `matrix` - A Matrix object describing the sprite's matrix.
  `visible` - True if the sprite is visible.
  `layer` - The sprite's layer.

Method Detail

### getSpriteWorld

    public SpriteWorld getSpriteWorld()

  Return the sprite world that this sprite belongs too

### invalidate

    public void invalidate()

  This method invalidates the portion of the sprite's sprite world which is occupied by the sprite.
  QuickTime::InvalidateSprite ()

### hitTest

    public boolean hitTest(int flags,
                           QDPoint loc)
                    throws StdQTException

  This method tests if a point is inside a sprite.
  QuickTime::SpriteHitTest ()

  Parameters:
    `flags` - Specifies the control flags.
    `loc` - Specifies the test point.
  Returns:
    true if the point is inside the sprite, false if not.

### getMatrix

    public Matrix getMatrix()
                     throws StdQTException

  This method gets the matrix property of this sprite.
  QuickTime::GetSpriteProperty ()

  Returns:
    the matrix.

### setMatrix

    public void setMatrix(Matrix matrix)
                   throws StdQTException

  This method sets the matrix property of this sprite.
  QuickTime::SetSpriteProperty ()

  Parameters:
    `matrix` - Specifies the matrix.

### getImageDescription

    public ImageDescription getImageDescription()
                                         throws StdQTException

  This method gets the image description property of this sprite.
  QuickTime::GetSpriteProperty ()

  Returns:
    the image description.

### getInitialSize

    public java.awt.Dimension getInitialSize()
                                      throws StdQTException

  Deprecated. since QTJava 4.0

  This method returns the original width and height of the image currently being presented by the sprite.
  QuickTime::GetSpriteProperty ()

  Returns:
    a Dimension

### getOriginalSize

    public QDDimension getOriginalSize()
                                throws StdQTException

  This method returns the original width and height of the image currently being presented by the sprite.
  QuickTime::GetSpriteProperty ()

  Returns:
    a QDDimension

### setImageDescription

    public void setImageDescription(ImageDescription idh)
                             throws StdQTException

  This method sets the image description property of this sprite.
  QuickTime::SetSpriteProperty ()

  Parameters:
    `idh` - Specifies the image description.

### getImageData

    public RawEncodedImage getImageData()
                                 throws StdQTException

  This method gets the image data property of this sprite.
  QuickTime::GetSpriteProperty ()

  Returns:
    the image data.

### setImageData

    public void setImageData(EncodedImage data)
                      throws StdQTException

  This method sets the image data property of this sprite. It will also set the size of the image data to the size of the pointer. If the actual size of the image data is smaller than the handle you should set the imageDataSize after this call to the desired size.
  QuickTime::SetSpriteProperty ()

  Parameters:
    `data` - Specifies the image data.

### setImageDataIfDifferent

    public boolean setImageDataIfDifferent(EncodedImage data)
                                    throws StdQTException

  This method sets the image data property of this sprite. It will also set the size of the image data to the size of the pointer. If the actual size of the image data is smaller than the handle you should set the imageDataSize after this call to the desired size.

  This method can be useful to use if the SpriteWorld the Sprite is a member of should be redrawn after changing the image data of a Sprite.
  QuickTime::SetSpriteProperty ()

  Parameters:
    `data` - Specifies the image data.
  Returns:
    a boolean which indicates if the incoming image data is different (true) than the previous data the sprite was presented.

### getVisible

    public boolean getVisible()
                       throws StdQTException

  This method gets the visibility property of this sprite.
  QuickTime::GetSpriteProperty ()

  Returns:
    the visibility.

### setVisible

    public void setVisible(boolean visible)
                    throws StdQTException

  This method sets the visibility property of this sprite.
  QuickTime::SetSpriteProperty ()

  Parameters:
    `visible` - Specifies the visibility.

### getLayer

    public int getLayer()
                 throws StdQTException

  This method gets the layer property of this sprite.
  QuickTime::GetSpriteProperty ()

  Returns:
    the layer.

### setLayer

    public void setLayer(int layer)
                  throws StdQTException

  This method sets the layer property of this sprite.
  QuickTime::SetSpriteProperty ()

  Parameters:
    `layer` - Specifies the layer.

### getGraphicsMode

    public GraphicsMode getGraphicsMode()
                                 throws StdQTException

  This method gets the graphics mode property of this sprite.
  QuickTime::GetSpriteProperty ()

  Returns:
    the graphics mode.

### setGraphicsMode

    public void setGraphicsMode(GraphicsMode gMode)
                         throws StdQTException

  This method sets the graphics mode property of this sprite.
  QuickTime::SetSpriteProperty ()

  Parameters:
    `gMode` - Specifies the graphics mode.

### getImageDataSize

    public int getImageDataSize()
                         throws StdQTException

  This method gets the size of the image data that a sprite is currently displaying.
  QuickTime::GetSpriteProperty ()

  Returns:
    the size of the image data

### setImageDataSize

    public void setImageDataSize(int size)
                          throws StdQTException

  This method sets the size of the image data that the sprite is currently displaying. If you know the size of the image data it is recommended that you set this.
  QuickTime::SetSpriteProperty ()

  Parameters:
    `size` - the size of the image data

### remove

    public void remove()

  This will remove the sprite from the SpriteWorld it is contained in and destroy its internal structures. The Sprite is not usuable after this call. If you have any other java objects that refer to this sprite, they will also be unusable - so use this call with care.
  QuickTime::DisposeSprite ()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD