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.
-
SpriteWorld(QDGraphics, QDGraphics, QDColor, QDGraphics)
- This constructor creates a new sprite world.
-
getBounds()
- Returns the current bounds of the SpriteWorld.
-
getMatrix()
- Returns the current transformational matrix used by the sprite world
-
hitTest(int, QDPoint)
- This method is used to determine if a sprite exists at a certain location.
-
idle(int)
- This method allows the sprite world to update and redraw the invalid portions of the sprite world.
-
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.
-
setBounds(QDRect)
- Sets the bounds of the SpriteWorld by scaling its matrix.
-
setClip(Region)
- This method sets the sprite world's clip.
-
setFlags(int, int)
- Set the flags for the sprite world.
-
setGraphicsMode(GraphicsMode)
- This method sets the Graphic's mode of the SpriteWorld.
-
setMatrix(Matrix)
- This method sets the sprite world's matrix.
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
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
getBounds
public final QDRect getBounds() throws StdQTException
- Returns the current bounds of the SpriteWorld.
- Returns:
- the bounds of the SpriteWorld
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.
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
getMatrix
public final Matrix getMatrix()
- Returns the current transformational matrix used by the sprite world
- Returns:
- the current matrix.
setMatrix
public final void setMatrix(Matrix matrix) throws StdQTException
- This method sets the sprite world's matrix.
QuickTime::SetSpriteWorldMatrix()
- Parameters:
- matrix - Specifies the Matrix.
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.
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.
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.
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