Public Types | Public Member Functions

gnash::BitmapData_as Class Reference

Implements the BitmapData native type. More...

#include <BitmapData_as.h>

Inheritance diagram for gnash::BitmapData_as:
Inheritance graph
[legend]
Collaboration diagram for gnash::BitmapData_as:
Collaboration graph
[legend]

List of all members.

Public Types

typedef image::pixel_iterator
< image::ARGB
iterator

Public Member Functions

 BitmapData_as (as_object *owner, std::auto_ptr< image::GnashImage > im)
 Construct a BitmapData.
virtual ~BitmapData_as ()
size_t width () const
 Return the width of the image.
size_t height () const
 Return the height of the image.
bool transparent () const
const CachedBitmapbitmapInfo () const
void setPixel (size_t x, size_t y, boost::uint32_t color) const
 Set a specified pixel to the specified color.
void setPixel32 (size_t x, size_t y, boost::uint32_t color) const
 Set a specified pixel to the specified color.
boost::uint32_t getPixel (size_t x, size_t y) const
 Returns the value of the pixel at (x, y).
void fillRect (int x, int y, int w, int h, boost::uint32_t color)
 Fill the bitmap with a colour starting at x, y.
void floodFill (size_t x, size_t y, boost::uint32_t old, boost::uint32_t fill)
void dispose ()
 Free the bitmap data.
void draw (MovieClip &mc, const Transform &transform)
 Draw a MovieClip to a BitmapData.
void attach (DisplayObject *obj)
 Attach this BitmapData to an object.
virtual void setReachable ()
 Overrides Relay::setReachable().
bool disposed () const
 Whether the BitmapData has been disposed.
iterator begin () const
iterator end () const

Detailed Description

Implements the BitmapData native type.

All functions can be called if the BitmapData has been disposed. Callers do not need to check.


Member Typedef Documentation


Constructor & Destructor Documentation

gnash::BitmapData_as::BitmapData_as ( as_object owner,
std::auto_ptr< image::GnashImage im 
)

Construct a BitmapData.

The constructor sets the immutable size of the bitmap, as well as whether it can handle transparency or not.

virtual gnash::BitmapData_as::~BitmapData_as (  )  [inline, virtual]

Member Function Documentation

void gnash::BitmapData_as::attach ( DisplayObject obj  )  [inline]

Attach this BitmapData to an object.

This may be either as a fill or an attached Bitmap.

iterator gnash::BitmapData_as::begin (  )  const [inline]

References disposed().

const CachedBitmap* gnash::BitmapData_as::bitmapInfo (  )  const [inline]
void gnash::BitmapData_as::dispose (  ) 

Free the bitmap data.

bool gnash::BitmapData_as::disposed (  )  const [inline]

Whether the BitmapData has been disposed.

Referenced by begin(), gnash::Bitmap::Bitmap(), end(), fillRect(), and getPixel().

void gnash::BitmapData_as::draw ( MovieClip mc,
const Transform transform 
)

Draw a MovieClip to a BitmapData.

iterator gnash::BitmapData_as::end (  )  const [inline]

References disposed().

void gnash::BitmapData_as::fillRect ( int  x,
int  y,
int  w,
int  h,
boost::uint32_t  color 
)

Fill the bitmap with a colour starting at x, y.

Negative values are handled correctly.

References disposed(), height(), and width().

void gnash::BitmapData_as::floodFill ( size_t  x,
size_t  y,
boost::uint32_t  old,
boost::uint32_t  fill 
)
boost::uint32_t gnash::BitmapData_as::getPixel ( size_t  x,
size_t  y 
) const

Returns the value of the pixel at (x, y).

Returns 0 if the pixel is out of range or the image has been disposed.

References disposed(), height(), and width().

size_t gnash::BitmapData_as::height (  )  const [inline]

Return the height of the image.

Do not call if disposed!

References gnash::image::GnashImage::height().

Referenced by fillRect(), and getPixel().

void gnash::BitmapData_as::setPixel ( size_t  x,
size_t  y,
boost::uint32_t  color 
) const

Set a specified pixel to the specified color.

Retains transparency value for BitmapDatas with transparency.

void gnash::BitmapData_as::setPixel32 ( size_t  x,
size_t  y,
boost::uint32_t  color 
) const

Set a specified pixel to the specified color.

void gnash::BitmapData_as::setReachable (  )  [virtual]

Overrides Relay::setReachable().

Reimplemented from gnash::Relay.

Referenced by gnash::Bitmap::markReachableObjects().

bool gnash::BitmapData_as::transparent (  )  const [inline]
size_t gnash::BitmapData_as::width (  )  const [inline]

Return the width of the image.

Do not call if disposed!

References gnash::image::GnashImage::width().

Referenced by fillRect(), and getPixel().


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