pleyo.com

WKAL::BitmapImage Class Reference

Inheritance diagram for WKAL::BitmapImage:

WKAL::Image Noncopyable

List of all members.

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< FrameDatam_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


Constructor & Destructor Documentation

WKAL::BitmapImage::BitmapImage ( BalSurface *  ,
ImageObserver = 0 
)

BitmapImage constructor.

Parameters:
[in] : platform surface
[in] : image Observer
 BitmapImage *bi = new BitmapImage(pSurf);

WKAL::BitmapImage::BitmapImage ( ImageObserver = 0  ) 

BitmapImage constructor.

Parameters:
[in] : image Observer
  BitmapImage *bi = new BitmapImage();

WKAL::BitmapImage::~BitmapImage (  ) 

~BitmapImage destructor

 delete bi;


Member Function Documentation

virtual bool WKAL::BitmapImage::isBitmapImage (  )  const [virtual]

test if it's a bitmap image

Parameters:
[out] : true if it's a bitmap image
 bi->isBitmapImage();

Reimplemented from WKAL::Image.

virtual IntSize WKAL::BitmapImage::size (  )  const [virtual]

get bitmap size

Parameters:
[out] : size
 IntSize s = bi->size();

Implements WKAL::Image.

virtual bool WKAL::BitmapImage::dataChanged ( bool  allDataReceived  )  [virtual]

test if the data is changed

Parameters:
[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]

stop animation

 bi->stopAnimation();

Reimplemented from WKAL::Image.

virtual void WKAL::BitmapImage::resetAnimation (  )  [virtual]

reset animation

 bi->resetAnimation();

Reimplemented from WKAL::Image.

virtual unsigned WKAL::BitmapImage::decodedSize (  )  const [virtual]

get decoded size

Parameters:
[out] : decoded size
 unsigned s = bi->decodedSize();

Reimplemented from WKAL::Image.

virtual NativeImagePtr WKAL::BitmapImage::nativeImageForCurrentFrame (  )  [virtual]

get nativeImage for current frame

Parameters:
[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

Parameters:
[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

Parameters:
[out] : current frame
 size_t c = bi->currentFrame();

size_t WKAL::BitmapImage::frameCount (  )  [protected]

get frame count

Parameters:
[out] : frame count
 size_t c = bi->frameCount();

NativeImagePtr WKAL::BitmapImage::frameAtIndex ( size_t   )  [protected]

frame at index

Parameters:
[in] : index
[out] : native image
 NativeImagePtr i = bi->frameAtIndex(1);

float WKAL::BitmapImage::frameDurationAtIndex ( size_t   )  [protected]

frame duration at index

Parameters:
[in] : index
[out] : duration
 float d = bi->frameDurationAtIndex(1);

bool WKAL::BitmapImage::frameHasAlphaAtIndex ( size_t   )  [protected]

get if the frame has alpha at index

Parameters:
[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.

Parameters:
[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.

Parameters:
[in] : incremental status
 bi->destroyDecodedData();

Reimplemented from WKAL::Image.

bool WKAL::BitmapImage::isSizeAvailable (  )  [protected]

Whether or not size is available yet.

Parameters:
[out] : status
 bool s = bi->isSizeAvailable();

bool WKAL::BitmapImage::shouldAnimate (  )  [protected]

should Animate

Parameters:
[out] : status
 bool s = bi->shouldAnimate();

virtual void WKAL::BitmapImage::startAnimation (  )  [protected, virtual]

start animation

 bi->startAnimation();

Reimplemented from WKAL::Image.

void WKAL::BitmapImage::advanceAnimation ( Timer< BitmapImage > *   )  [protected]

advance animation

Parameters:
[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

Parameters:
[out] : status
 bool c = bi->mayFillWithSolidColor();

Reimplemented from WKAL::Image.

virtual Color WKAL::BitmapImage::solidColor (  )  const [protected, virtual]

get solid color

Parameters:
[out] : color
 Color c = bi->solidColor();

Reimplemented from WKAL::Image.


Friends And Related Function Documentation

friend class GeneratedImage [friend]

Reimplemented from WKAL::Image.

friend class GraphicsContext [friend]

Reimplemented from WKAL::Image.


Member Data Documentation

IntSize WKAL::BitmapImage::m_size [mutable, protected]

bool WKAL::BitmapImage::m_haveSize [mutable, protected]

unsigned WKAL::BitmapImage::m_decodedSize [protected]

bool WKAL::BitmapImage::m_haveFrameCount [mutable, protected]

size_t WKAL::BitmapImage::m_frameCount [protected]


The documentation for this class was generated from the following file:

Generated on Mon Jun 30 16:22:08 2008 for Origyn Web Browser by Doxygen 1.5.5

pleyo.com
pleyo.com