|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.QTObject | +--quicktime.std.anim.SpriteWorld
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.
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Constructor Summary | |
SpriteWorld(QDGraphics port,
QDGraphics spriteLayer,
QDColor backgroundColor,
QDGraphics background)
This constructor creates a new sprite world. |
Method Summary | |
QDRect |
getBounds()
Returns the current bounds of the SpriteWorld. |
Matrix |
getMatrix()
Returns the current transformational matrix used by the sprite world |
Sprite |
hitTest(int flags,
QDPoint loc)
This method is used to determine if a sprite exists at a certain location. |
int |
idle(int flagsIn)
This method allows the sprite world to update and redraw the invalid portions of the sprite world. |
void |
invalidate(QDRect invalidArea)
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. |
void |
setBounds(QDRect bounds)
Sets the bounds of the SpriteWorld by scaling its matrix. |
void |
setClip(Region clipRgn)
This method sets the sprite world's clip. |
void |
setFlags(int flags,
int flagsMask)
Set the flags for the sprite world. |
void |
setGraphicsMode(GraphicsMode gMode)
This method sets the Graphic's mode of the SpriteWorld. |
void |
setMatrix(Matrix matrix)
This method sets the sprite world's matrix. |
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 |
public SpriteWorld(QDGraphics port, QDGraphics spriteLayer, QDColor backgroundColor, QDGraphics background) throws QTException
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 spritesMethod Detail |
public final void setBounds(QDRect bounds) throws StdQTException
bounds
- the new size of the SpriteWorldpublic final QDRect getBounds() throws StdQTException
public final void setClip(Region clipRgn) throws StdQTException
clipRgn
- Specifies the clipping region.public final void setGraphicsMode(GraphicsMode gMode) throws StdQTException
gMode
- the new graphic's mode for the SpriteWorldpublic final Matrix getMatrix()
public final void setMatrix(Matrix matrix) throws StdQTException
matrix
- Specifies the Matrix.public final int idle(int flagsIn) throws StdQTException
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.public final void invalidate(QDRect invalidArea) throws StdQTException
invalidArea
- A Rectangle which describes the invalid rectangle in sprite world source space.public final Sprite hitTest(int flags, QDPoint loc) throws QTException
flags
- This allows the hit testing operation to be controlled more precisely.loc
- The point that you wish to test.public final void setFlags(int flags, int flagsMask) throws StdQTException
flag
- the value you wish to set the property toflagMask
- the property that you want to effect
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |