
Public Member Functions | |
| BitmapImage (BalSurface *, ImageObserver *=0) | |
| BitmapImage constructor. | |
| BitmapImage (ImageObserver *=0) | |
| BitmapImage constructor. | |
| ~BitmapImage () | |
| ~BitmapImage destructor | |
| virtual bool | isBitmapImage () const |
| test if it's a bitmap image | |
| virtual IntSize | size () const |
| get bitmap size | |
| virtual bool | dataChanged (bool allDataReceived) |
| test if the data is changed | |
| virtual void | stopAnimation () |
| stop animation | |
| virtual void | resetAnimation () |
| reset animation | |
| virtual unsigned | decodedSize () const |
| get decoded size | |
| virtual NativeImagePtr | nativeImageForCurrentFrame () |
| get nativeImage for current frame | |
Protected Member Functions | |
| virtual void | draw (GraphicsContext *, const FloatRect &dstRect, const FloatRect &srcRect, CompositeOperator) |
| draw | |
| size_t | currentFrame () const |
| get current frame | |
| size_t | frameCount () |
| get frame count | |
| NativeImagePtr | frameAtIndex (size_t) |
| frame at index | |
| float | frameDurationAtIndex (size_t) |
| frame duration at index | |
| bool | frameHasAlphaAtIndex (size_t) |
| get if the frame has alpha at index | |
| void | cacheFrame (size_t index) |
| Decodes and caches a frame. | |
| virtual void | destroyDecodedData (bool incremental=false) |
| Called to invalidate all our cached data. | |
| bool | isSizeAvailable () |
| Whether or not size is available yet. | |
| bool | shouldAnimate () |
| should Animate | |
| virtual void | startAnimation () |
| start animation | |
| void | advanceAnimation (Timer< BitmapImage > *) |
| advance animation | |
| void | initPlatformData () |
| init platform data | |
| void | invalidatePlatformData () |
| invalidate platform data | |
| void | checkForSolidColor () |
| Checks to see if the image is a 1x1 solid color. | |
| virtual bool | mayFillWithSolidColor () const |
| may fill with a solid color | |
| virtual Color | solidColor () const |
| get solid color | |
Protected Attributes | |
| ImageSource | m_source |
| IntSize | m_size |
| size_t | m_currentFrame |
| Vector< FrameData > | m_frames |
| Timer< BitmapImage > * | m_frameTimer |
| int | m_repetitionCount |
| int | m_repetitionsComplete |
| Color | m_solidColor |
| bool | m_isSolidColor |
| bool | m_animatingImageType |
| bool | m_animationFinished |
| bool | m_allDataReceived |
| bool | m_haveSize |
| bool | m_sizeAvailable |
| unsigned | m_decodedSize |
| bool | m_haveFrameCount |
| size_t | m_frameCount |
Friends | |
| class | GeneratedImage |
| class | GraphicsContext |
| WKAL::BitmapImage::BitmapImage | ( | BalSurface * | , | |
| ImageObserver * | = 0 | |||
| ) |
BitmapImage constructor.
| [in] | : | platform surface |
| [in] | : | image Observer BitmapImage *bi = new BitmapImage(pSurf); |
| WKAL::BitmapImage::BitmapImage | ( | ImageObserver * | = 0 |
) |
| WKAL::BitmapImage::~BitmapImage | ( | ) |
~BitmapImage destructor
delete bi;
| virtual bool WKAL::BitmapImage::isBitmapImage | ( | ) | const [virtual] |
test if it's a bitmap image
| [out] | : | true if it's a bitmap image bi->isBitmapImage(); |
Reimplemented from WKAL::Image.
| virtual IntSize WKAL::BitmapImage::size | ( | ) | const [virtual] |
| virtual bool WKAL::BitmapImage::dataChanged | ( | bool | allDataReceived | ) | [virtual] |
test if the data is changed
| [in] | : | all data received status |
| [out] | : | true if the data is changed bool dc = bi->dataChanged(true); |
Reimplemented from WKAL::Image.
| virtual void WKAL::BitmapImage::stopAnimation | ( | ) | [virtual] |
| virtual void WKAL::BitmapImage::resetAnimation | ( | ) | [virtual] |
| virtual unsigned WKAL::BitmapImage::decodedSize | ( | ) | const [virtual] |
get decoded size
| [out] | : | decoded size unsigned s = bi->decodedSize();
|
Reimplemented from WKAL::Image.
| virtual NativeImagePtr WKAL::BitmapImage::nativeImageForCurrentFrame | ( | ) | [virtual] |
get nativeImage for current frame
| [out] | : | native image NativeImagePtr n = bi->nativeImageForCurrentFrame(); |
Reimplemented from WKAL::Image.
| virtual void WKAL::BitmapImage::draw | ( | GraphicsContext * | , | |
| const FloatRect & | dstRect, | |||
| const FloatRect & | srcRect, | |||
| CompositeOperator | ||||
| ) | [protected, virtual] |
draw
| [in] | : | graphics context |
| [in] | : | destination rectangle |
| [in] | : | source rectangle |
| [in] | : | composite operator bi->draw(gc, dr, sr, op); |
Implements WKAL::Image.
| size_t WKAL::BitmapImage::currentFrame | ( | ) | const [protected] |
get current frame
| [out] | : | current frame size_t c = bi->currentFrame();
|
| size_t WKAL::BitmapImage::frameCount | ( | ) | [protected] |
get frame count
| [out] | : | frame count size_t c = bi->frameCount();
|
| NativeImagePtr WKAL::BitmapImage::frameAtIndex | ( | size_t | ) | [protected] |
frame at index
| [in] | : | index |
| [out] | : | native image NativeImagePtr i = bi->frameAtIndex(1); |
| float WKAL::BitmapImage::frameDurationAtIndex | ( | size_t | ) | [protected] |
frame duration at index
| [in] | : | index |
| [out] | : | duration float d = bi->frameDurationAtIndex(1);
|
| bool WKAL::BitmapImage::frameHasAlphaAtIndex | ( | size_t | ) | [protected] |
get if the frame has alpha at index
| [in] | : | index |
| [out] | : | true if the frame has alpha at index bool a = bi->frameHasAlphaAtIndex(1);
|
| void WKAL::BitmapImage::cacheFrame | ( | size_t | index | ) | [protected] |
Decodes and caches a frame.
Never accessed except internally.
| [in] | : | index bi->cacheFrame(1); |
| virtual void WKAL::BitmapImage::destroyDecodedData | ( | bool | incremental = false |
) | [protected, virtual] |
Called to invalidate all our cached data.
If an image is loading incrementally, we only invalidate the last cached frame.
| [in] | : | incremental status bi->destroyDecodedData(); |
Reimplemented from WKAL::Image.
| bool WKAL::BitmapImage::isSizeAvailable | ( | ) | [protected] |
Whether or not size is available yet.
| [out] | : | status bool s = bi->isSizeAvailable();
|
| bool WKAL::BitmapImage::shouldAnimate | ( | ) | [protected] |
should Animate
| [out] | : | status bool s = bi->shouldAnimate();
|
| virtual void WKAL::BitmapImage::startAnimation | ( | ) | [protected, virtual] |
| void WKAL::BitmapImage::advanceAnimation | ( | Timer< BitmapImage > * | ) | [protected] |
advance animation
| [in] | : | timer bi->advanceAnimation(t); |
| void WKAL::BitmapImage::initPlatformData | ( | ) | [protected] |
init platform data
bi->initPlatformData();
| void WKAL::BitmapImage::invalidatePlatformData | ( | ) | [protected] |
invalidate platform data
bi->invalidatePlatformData();
| void WKAL::BitmapImage::checkForSolidColor | ( | ) | [protected] |
Checks to see if the image is a 1x1 solid color.
We optimize these images and just do a fill rect instead.
bi->checkForSolidColor();
| virtual bool WKAL::BitmapImage::mayFillWithSolidColor | ( | ) | const [protected, virtual] |
may fill with a solid color
| [out] | : | status bool c = bi->mayFillWithSolidColor();
|
Reimplemented from WKAL::Image.
| virtual Color WKAL::BitmapImage::solidColor | ( | ) | const [protected, virtual] |
get solid color
| [out] | : | color Color c = bi->solidColor(); |
Reimplemented from WKAL::Image.
friend class GeneratedImage [friend] |
Reimplemented from WKAL::Image.
friend class GraphicsContext [friend] |
Reimplemented from WKAL::Image.
ImageSource WKAL::BitmapImage::m_source [protected] |
IntSize WKAL::BitmapImage::m_size [mutable, protected] |
size_t WKAL::BitmapImage::m_currentFrame [protected] |
Vector<FrameData> WKAL::BitmapImage::m_frames [protected] |
Timer<BitmapImage>* WKAL::BitmapImage::m_frameTimer [protected] |
int WKAL::BitmapImage::m_repetitionCount [protected] |
int WKAL::BitmapImage::m_repetitionsComplete [protected] |
Color WKAL::BitmapImage::m_solidColor [protected] |
bool WKAL::BitmapImage::m_isSolidColor [protected] |
bool WKAL::BitmapImage::m_animatingImageType [protected] |
bool WKAL::BitmapImage::m_animationFinished [protected] |
bool WKAL::BitmapImage::m_allDataReceived [protected] |
bool WKAL::BitmapImage::m_haveSize [mutable, protected] |
bool WKAL::BitmapImage::m_sizeAvailable [protected] |
unsigned WKAL::BitmapImage::m_decodedSize [protected] |
bool WKAL::BitmapImage::m_haveFrameCount [mutable, protected] |
size_t WKAL::BitmapImage::m_frameCount [protected] |