:: com :: sun :: star :: rendering ::

interface XSpriteCanvas
Base Interfaces
XSpriteCanvasXBitmapCanvasXCanvas

XBitmapCanvas

Methods' Summary
createSpriteFromAnimation Create a sprite object from the specified animation sequence. A sprite is a back-buffered object with its own, independent animation.  
createSpriteFromBitmaps Create a sprite object from the specified animation sequence. A sprite is a back-buffered object with its own, independent animation.  
createCustomSprite Create a custom, user-handles-it-all sprite object. A sprite is a back-buffered object with its own, independent animation.  
createClonedSprite Create a cloned version of an already existing sprite object. The cloned sprite always shows the same content as its original. Furthermore, cloned copies of a hidden original are never visible, although cloned copies of a visible original can of course be invisible.  
updateScreen Tells the sprite canvas to now update the screen representation. Required to display rendered changes to the canvas, and updates to stopped animations and XCustomSprites in general. This method will return only after the screen update is done, or earlier if an error happened. 
Methods' Details
createSpriteFromAnimation
XAnimatedSprite
createSpriteFromAnimation( [in] XAnimation  animation )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
Create a sprite object from the specified animation sequence. A sprite is a back-buffered object with its own, independent animation.
createSpriteFromBitmaps
XAnimatedSprite
createSpriteFromBitmaps( [in] sequence< XBitmap >  animationBitmaps,
[in] byte  interpolationMode )
raises( ::com::sun::star::lang::IllegalArgumentException,
VolatileContentDestroyedException );

Description
Create a sprite object from the specified animation sequence. A sprite is a back-buffered object with its own, independent animation.
Parameter animationBitmaps
Sequence of bitmaps. The bitmaps don't need to have the same size, but they are all rendered with their left, top edges aligned.
Parameter interpolationMode
Value of InterpolationMode, to determine whether and how to interpolate between the provided bitmaps, if animation runs fast enough.
Throws
VolatileContentDestroyedException if at least one of the bitmap is volatile, and its content has been destroyed by the system.
createCustomSprite
XCustomSprite
createCustomSprite( [in] ::com::sun::star::geometry::RealSize2D  spriteSize )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
Create a custom, user-handles-it-all sprite object. A sprite is a back-buffered object with its own, independent animation.
Parameter spriteSize
The required size of the sprite in device coordinates. Everything that is rendered outside this area might be clipped on output. Both components of the size must be greater than zero.
Returns
an interface to a custom sprite object.
createClonedSprite
XSprite
createClonedSprite( [in] XSprite  original )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
Create a cloned version of an already existing sprite object. The cloned sprite always shows the same content as its original. Furthermore, cloned copies of a hidden original are never visible, although cloned copies of a visible original can of course be invisible.
Parameter original
The original sprite to copy the content from. This sprite must have been created by the same XSpriteCanvas instance as this method is called on. Other sprite instances will generate an IllegalArgumentException.
Returns
an interface to a sprite object.
updateScreen
boolean
updateScreen( [in] boolean  bUpdateAll );

Description
Tells the sprite canvas to now update the screen representation. Required to display rendered changes to the canvas, and updates to stopped animations and XCustomSprites in general. This method will return only after the screen update is done, or earlier if an error happened.

If double buffering is enabled via XBufferController, no explicit call of updateScreen() is necessary, since the XBufferController methods will automatically notify all associated XSpriteCanvas instances.

Parameter bUpdateAll
When true, update the whole screen. When false, implementation is permitted to restrict update to areas the canvas itself changed (e.g. because of render operations, or changes on the sprites). The former is useful for updates after window expose events. the latter for animation display.
Returns
true, if the screen update was successfully performed
Top of Page