Public Types | Public Member Functions | Static Public Attributes | Friends

a5::Atlas_Bitmap Class Reference
[Atlas]

Bitmap containing reference to an allocated part of a texture atlas. More...

#include <Atlas.hpp>

Inheritance diagram for a5::Atlas_Bitmap:
Inheritance graph

List of all members.

Public Types

enum  LockType {
  ReadWrite = 0,
  Read = ALLEGRO_LOCK_READONLY,
  Write = ALLEGRO_LOCK_WRITEONLY
}
 

Describes the type of Lock.

More...

Public Member Functions

 ~Atlas_Bitmap ()
 Unregisters the bitmap from the atlas.
std::auto_ptr< Bitmap_LockLock (Pixel_Format format=Pixel_Format::Any, LockType type=ReadWrite)
 Locks an entire bitmap.
std::auto_ptr< Bitmap_LockLock (const Rectangle rect, Pixel_Format format=Pixel_Format::Any, LockType type=ReadWrite)
 Locks a region of a bitmap.
unit Width () const
 Returns the width of the bitmap.
unit Height () const
 Returns the height of the bitmap.
void Clear (Color c=RGB(0, 0, 0))
 Clears the bitmap to the specified color.
void Target ()
 Sets the global Allegro target bitmap to this Shouldn't need to be called if using pure A5SES.
std::auto_ptr< BitmapSub (Rectangle r)
 Creates a sub-bitmap object from the specified rectangle.
void PutPixel (unit x, unit y, Color c)
 Sets a pixel to a color.
Color GetPixel (unit x, unit y)
 Returns the color of a pixel.
void Blit (Bitmap &src, unit x, unit y, int flags=0)
 Draws an entire Bitmap to this one.
void Blit (Bitmap &src, unit x, unit y, Rectangle clip, int flags=0)
 Draws a partial Bitmap to this one.
void BlitScaled (Bitmap &src, Rectangle r, int flags=0)
 Draws a bitmap scaled to r to this one.
void BlitScaled (Bitmap &src, unit x, unit y, Rectangle r, Rectangle clip, int flags=0)
 Draws a bitmap scaled to r and clipped to clip to this one.
void BlitTinted (Bitmap &src, Color tint, unit x, unit y, int flags=0)
 Draws an entire Bitmap to this one (tinted).
void BlitTinted (Bitmap &src, Color tint, unit x, unit y, Rectangle clip, int flags=0)
 Draws a partial Bitmap to this one (tinted).
void BlitTintedScaled (Bitmap &src, Color tint, unit x, unit y, Rectangle r, int flags=0)
 Draws a bitmap scaled to r to this one (tinted).
void BlitTintedScaled (Bitmap &src, Color tint, unit x, unit y, Rectangle r, Rectangle clip, int flags=0)
 Draws a bitmap scaled to r and clipped to clip to this one (tinted).
ALLEGRO_BITMAP * Release ()
 Releases the held C structure so it is no longer automatically freed.
 operator ALLEGRO_BITMAP * () const
 Returns a pointer to the Allegro bitmap structure.

Static Public Attributes

static const int FlipHorizontal = ALLEGRO_FLIP_HORIZONTAL
 Flip the image on the x axis.
static const int FlipVertical = ALLEGRO_FLIP_VERTICAL
 Flip the image on the y axis.

Friends

class a5::Atlas
class Display

Detailed Description

Bitmap containing reference to an allocated part of a texture atlas.


Member Enumeration Documentation

enum a5::Bitmap::LockType [inherited]

Describes the type of Lock.


Constructor & Destructor Documentation

a5::Atlas_Bitmap::~Atlas_Bitmap (  ) 

Unregisters the bitmap from the atlas.


Member Function Documentation

std::auto_ptr<Bitmap_Lock> a5::Bitmap::Lock ( Pixel_Format  format = Pixel_Format::Any,
LockType  type = ReadWrite 
) [inherited]

Locks an entire bitmap.

std::auto_ptr<Bitmap_Lock> a5::Bitmap::Lock ( const Rectangle  rect,
Pixel_Format  format = Pixel_Format::Any,
LockType  type = ReadWrite 
) [inherited]

Locks a region of a bitmap.

Exceptions:
Bitmap::Lock_Failed 
unit a5::Bitmap::Width (  )  const [inherited]

Returns the width of the bitmap.

unit a5::Bitmap::Height (  )  const [inherited]

Returns the height of the bitmap.

void a5::Bitmap::Clear ( Color  c = RGB(0, 0, 0)  )  [inherited]

Clears the bitmap to the specified color.

void a5::Bitmap::Target (  )  [inherited]

Sets the global Allegro target bitmap to this Shouldn't need to be called if using pure A5SES.

std::auto_ptr<Bitmap> a5::Bitmap::Sub ( Rectangle  r  )  [inherited]

Creates a sub-bitmap object from the specified rectangle.

void a5::Bitmap::PutPixel ( unit  x,
unit  y,
Color  c 
) [inherited]

Sets a pixel to a color.

Color a5::Bitmap::GetPixel ( unit  x,
unit  y 
) [inherited]

Returns the color of a pixel.

void a5::Bitmap::Blit ( Bitmap src,
unit  x,
unit  y,
int  flags = 0 
) [inherited]

Draws an entire Bitmap to this one.

void a5::Bitmap::Blit ( Bitmap src,
unit  x,
unit  y,
Rectangle  clip,
int  flags = 0 
) [inherited]

Draws a partial Bitmap to this one.

void a5::Bitmap::BlitScaled ( Bitmap src,
Rectangle  r,
int  flags = 0 
) [inherited]

Draws a bitmap scaled to r to this one.

void a5::Bitmap::BlitScaled ( Bitmap src,
unit  x,
unit  y,
Rectangle  r,
Rectangle  clip,
int  flags = 0 
) [inherited]

Draws a bitmap scaled to r and clipped to clip to this one.

void a5::Bitmap::BlitTinted ( Bitmap src,
Color  tint,
unit  x,
unit  y,
int  flags = 0 
) [inherited]

Draws an entire Bitmap to this one (tinted).

void a5::Bitmap::BlitTinted ( Bitmap src,
Color  tint,
unit  x,
unit  y,
Rectangle  clip,
int  flags = 0 
) [inherited]

Draws a partial Bitmap to this one (tinted).

void a5::Bitmap::BlitTintedScaled ( Bitmap src,
Color  tint,
unit  x,
unit  y,
Rectangle  r,
int  flags = 0 
) [inherited]

Draws a bitmap scaled to r to this one (tinted).

void a5::Bitmap::BlitTintedScaled ( Bitmap src,
Color  tint,
unit  x,
unit  y,
Rectangle  r,
Rectangle  clip,
int  flags = 0 
) [inherited]

Draws a bitmap scaled to r and clipped to clip to this one (tinted).

ALLEGRO_BITMAP* a5::Bitmap::Release (  )  [inherited]

Releases the held C structure so it is no longer automatically freed.

a5::Bitmap::operator ALLEGRO_BITMAP * (  )  const [inherited]

Returns a pointer to the Allegro bitmap structure.


Member Data Documentation

const int a5::Bitmap::FlipHorizontal = ALLEGRO_FLIP_HORIZONTAL [static, inherited]

Flip the image on the x axis.

const int a5::Bitmap::FlipVertical = ALLEGRO_FLIP_VERTICAL [static, inherited]

Flip the image on the y axis.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines