All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.std.anim.SpriteWorld

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

public class SpriteWorld
extends QTObject
implements QuickTimeLib
The SpriteWorld class implements the corresponding data structure of the Movie Toolbox. Your application can use SpriteWorld's to make animations. A Sprite World handles the common tasks of invalidating appropriate areas as sprite properties change, the composition of sprites and their background on an offscreen buffer, and the blitting of the result to the screen or alternate destination.


Constructor Index

 o SpriteWorld(QDGraphics, QDGraphics, QDColor, QDGraphics)
This constructor creates a new sprite world.

Method Index

 o getBounds()
Returns the current bounds of the SpriteWorld.
 o getMatrix()
Returns the current transformational matrix used by the sprite world
 o hitTest(int, QDPoint)
This method is used to determine if a sprite exists at a certain location.
 o idle(int)
This method allows the sprite world to update and redraw the invalid portions of the sprite world.
 o invalidate(QDRect)
This method allows a rectangular area of the sprite world to be invalidated, which will force it to redraw the next time SpriteWorldIdle is called.
 o setBounds(QDRect)
Sets the bounds of the SpriteWorld by scaling its matrix.
 o setClip(Region)
This method sets the sprite world's clip.
 o setFlags(int, int)
Set the flags for the sprite world.
 o setGraphicsMode(GraphicsMode)
This method sets the Graphic's mode of the SpriteWorld.
 o setMatrix(Matrix)
This method sets the sprite world's matrix.

Constructors

 o SpriteWorld
 public SpriteWorld(QDGraphics port,
                    QDGraphics spriteLayer,
                    QDColor backgroundColor,
                    QDGraphics background) throws QTException
This constructor creates a new sprite world.

QuickTime::NewSpriteWorld()

Parameters:
port - the target destination of the SpriteWorld. This may NOT be null.
spriteLayer - Specifies the mSpriteGWorld QDGraphics.
backgroundColor - Specifies the background color.
background - Specifies the background QDGraphics that can be used for better performance when you have background sprites

Methods

 o setBounds
 public final void setBounds(QDRect bounds) throws StdQTException
Sets the bounds of the SpriteWorld by scaling its matrix.

Parameters:
bounds - the new size of the SpriteWorld
 o getBounds
 public final QDRect getBounds() throws StdQTException
Returns the current bounds of the SpriteWorld.

Returns:
the bounds of the SpriteWorld
 o setClip
 public final void setClip(Region clipRgn) throws StdQTException
This method sets the sprite world's clip.

QuickTime::SetSpriteWorldClip()

Parameters:
clipRgn - Specifies the clipping region.
 o setGraphicsMode
 public final void setGraphicsMode(GraphicsMode gMode) throws StdQTException
This method sets the Graphic's mode of the SpriteWorld.

QuickTime::SetSpriteWorldGraphicsMode()

Parameters:
gMode - the new graphic's mode for the SpriteWorld
 o getMatrix
 public final Matrix getMatrix()
Returns the current transformational matrix used by the sprite world

Returns:
the current matrix.
 o setMatrix
 public final void setMatrix(Matrix matrix) throws StdQTException
This method sets the sprite world's matrix.

QuickTime::SetSpriteWorldMatrix()

Parameters:
matrix - Specifies the Matrix.
 o idle
 public final int idle(int flagsIn) throws StdQTException
This method allows the sprite world to update and redraw the invalid portions of the sprite world.

QuickTime::SpriteWorldIdle()

Parameters:
flagsIn - Contains flags describing what type of actions may take place during the idle, such as if drawing to the final destination should be pressed.
Returns:
Flags describing what type of actions took place during the idle, such as if any drawing took place.
 o invalidate
 public final void invalidate(QDRect invalidArea) throws StdQTException
This method allows a rectangular area of the sprite world to be invalidated, which will force it to redraw the next time SpriteWorldIdle is called.

QuickTime::InvalidateSpriteWorld()

Parameters:
invalidArea - A Rectangle which describes the invalid rectangle in sprite world source space.
 o hitTest
 public final Sprite hitTest(int flags,
                             QDPoint loc) throws QTException
This method is used to determine if a sprite exists at a certain location.

QuickTime::SpriteWorldHitTest()

Parameters:
flags - This allows the hit testing operation to be controlled more precisely.
loc - The point that you wish to test.
Returns:
the Sprite object which received the hit, or null if no sprite at that location.
 o setFlags
 public final void setFlags(int flags,
                            int flagsMask) throws StdQTException
Set the flags for the sprite world.

QuickTime::SetSpriteWorldFlags()

Parameters:
flag - the value you wish to set the property to
flagMask - the property that you want to effect

All Packages  Class Hierarchy  This Package  Previous  Next  Index