Starshatter_Open
Open source Starshatter engine
|
#include <Bitmap.h>
Public Types | |
enum | BMP_TYPES { BMP_SOLID, BMP_TRANSPARENT, BMP_TRANSLUCENT } |
Public Member Functions | |
Bitmap () | |
Bitmap (int w, int h, ColorIndex *p=0, int t=BMP_SOLID) | |
Bitmap (int w, int h, Color *p, int t=BMP_SOLID) | |
virtual | ~Bitmap () |
int | IsIndexed () const |
int | IsHighColor () const |
int | IsDual () const |
void | SetType (int t) |
int | Type () const |
bool | IsSolid () const |
bool | IsTransparent () const |
bool | IsTranslucent () const |
int | Width () const |
int | Height () const |
ColorIndex * | Pixels () const |
Color * | HiPixels () const |
int | BmpSize () const |
int | RowSize () const |
ColorIndex | GetIndex (int x, int y) const |
Color | GetColor (int x, int y) const |
void | SetIndex (int x, int y, ColorIndex c) |
void | SetColor (int x, int y, Color c) |
void | FillColor (Color c) |
void | ClearImage () |
void | BitBlt (int x, int y, const Bitmap &srcImage, int sx, int sy, int w, int h, bool blend=false) |
void | CopyBitmap (const Bitmap &rhs) |
void | CopyImage (int w, int h, BYTE *p, int t=BMP_SOLID) |
void | CopyHighColorImage (int w, int h, DWORD *p, int t=BMP_SOLID) |
void | CopyAlphaImage (int w, int h, BYTE *p) |
void | CopyAlphaRedChannel (int w, int h, DWORD *p) |
void | AutoMask (DWORD mask=0) |
virtual BYTE * | GetSurface () |
virtual int | Pitch () const |
virtual int | PixSize () const |
bool | ClipLine (int &x1, int &y1, int &x2, int &y2) |
bool | ClipLine (double &x1, double &y1, double &x2, double &y2) |
void | DrawLine (int x1, int y1, int x2, int y2, Color color) |
void | DrawRect (int x1, int y1, int x2, int y2, Color color) |
void | DrawRect (const Rect &r, Color color) |
void | FillRect (int x1, int y1, int x2, int y2, Color color) |
void | FillRect (const Rect &r, Color color) |
void | DrawEllipse (int x1, int y1, int x2, int y2, Color color, BYTE quad=0x0f) |
void | DrawEllipsePoints (int x0, int y0, int x, int y, Color c, BYTE quad) |
void | ScaleTo (int w, int h) |
void | MakeIndexed () |
void | MakeHighColor () |
void | MakeTexture () |
bool | IsTexture () const |
void | TakeOwnership () |
const char * | GetFilename () const |
void | SetFilename (const char *s) |
DWORD | LastModified () const |
Public Member Functions inherited from Resource | |
Resource () | |
virtual | ~Resource () |
int | operator== (const Resource &r) const |
HANDLE | Handle () const |
Static Public Member Functions | |
static const char * | TYPENAME () |
static Bitmap * | Default () |
static Bitmap * | GetBitmapByID (HANDLE bmp_id) |
static Bitmap * | CheckCache (const char *filename) |
static void | AddToCache (Bitmap *bmp) |
static void | CacheUpdate () |
static void | ClearCache () |
static DWORD | CacheMemoryFootprint () |
Protected Attributes | |
int | type |
int | width |
int | height |
int | mapsize |
bool | ownpix |
bool | alpha_loaded |
bool | texture |
ColorIndex * | pix |
Color * | hipix |
DWORD | last_modified |
char | filename [64] |
Protected Attributes inherited from Resource | |
HANDLE | id |
enum Bitmap::BMP_TYPES |
Bitmap::Bitmap | ( | ) |
Definition at line 64 of file Bitmap.cpp.
Bitmap::Bitmap | ( | int | w, |
int | h, | ||
ColorIndex * | p = 0 , |
||
int | t = BMP_SOLID |
||
) |
Definition at line 73 of file Bitmap.cpp.
Definition at line 82 of file Bitmap.cpp.
|
virtual |
Definition at line 93 of file Bitmap.cpp.
|
static |
Definition at line 860 of file Bitmap.cpp.
void Bitmap::AutoMask | ( | DWORD | mask = 0 | ) |
Definition at line 435 of file Bitmap.cpp.
void Bitmap::BitBlt | ( | int | x, |
int | y, | ||
const Bitmap & | srcImage, | ||
int | sx, | ||
int | sy, | ||
int | w, | ||
int | h, | ||
bool | blend = false |
||
) |
Definition at line 149 of file Bitmap.cpp.
int Bitmap::BmpSize | ( | ) | const |
Definition at line 104 of file Bitmap.cpp.
|
static |
Definition at line 883 of file Bitmap.cpp.
|
static |
Definition at line 866 of file Bitmap.cpp.
|
static |
Definition at line 848 of file Bitmap.cpp.
|
static |
Definition at line 877 of file Bitmap.cpp.
void Bitmap::ClearImage | ( | ) |
Definition at line 301 of file Bitmap.cpp.
bool Bitmap::ClipLine | ( | int & | x1, |
int & | y1, | ||
int & | x2, | ||
int & | y2 | ||
) |
Definition at line 904 of file Bitmap.cpp.
bool Bitmap::ClipLine | ( | double & | x1, |
double & | y1, | ||
double & | x2, | ||
double & | y2 | ||
) |
Definition at line 963 of file Bitmap.cpp.
void Bitmap::CopyAlphaImage | ( | int | w, |
int | h, | ||
BYTE * | p | ||
) |
Definition at line 393 of file Bitmap.cpp.
void Bitmap::CopyAlphaRedChannel | ( | int | w, |
int | h, | ||
DWORD * | p | ||
) |
Definition at line 413 of file Bitmap.cpp.
void Bitmap::CopyBitmap | ( | const Bitmap & | rhs | ) |
Definition at line 249 of file Bitmap.cpp.
void Bitmap::CopyHighColorImage | ( | int | w, |
int | h, | ||
DWORD * | p, | ||
int | t = BMP_SOLID |
||
) |
Definition at line 358 of file Bitmap.cpp.
void Bitmap::CopyImage | ( | int | w, |
int | h, | ||
BYTE * | p, | ||
int | t = BMP_SOLID |
||
) |
Definition at line 323 of file Bitmap.cpp.
|
static |
Definition at line 799 of file Bitmap.cpp.
void Bitmap::DrawEllipse | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
Color | color, | ||
BYTE | quad = 0x0f |
||
) |
Definition at line 1402 of file Bitmap.cpp.
void Bitmap::DrawEllipsePoints | ( | int | x0, |
int | y0, | ||
int | x, | ||
int | y, | ||
Color | c, | ||
BYTE | quad | ||
) |
Definition at line 1481 of file Bitmap.cpp.
void Bitmap::DrawLine | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
Color | color | ||
) |
Definition at line 1022 of file Bitmap.cpp.
void Bitmap::DrawRect | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
Color | color | ||
) |
Definition at line 1280 of file Bitmap.cpp.
Definition at line 1312 of file Bitmap.cpp.
void Bitmap::FillColor | ( | Color | c | ) |
Definition at line 461 of file Bitmap.cpp.
void Bitmap::FillRect | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
Color | color | ||
) |
Definition at line 1343 of file Bitmap.cpp.
Definition at line 1370 of file Bitmap.cpp.
|
static |
Definition at line 836 of file Bitmap.cpp.
Color Bitmap::GetColor | ( | int | x, |
int | y | ||
) | const |
Definition at line 722 of file Bitmap.cpp.
ColorIndex Bitmap::GetIndex | ( | int | x, |
int | y | ||
) | const |
Definition at line 702 of file Bitmap.cpp.
|
virtual |
Definition at line 134 of file Bitmap.cpp.
void Bitmap::MakeHighColor | ( | ) |
Definition at line 593 of file Bitmap.cpp.
void Bitmap::MakeIndexed | ( | ) |
Definition at line 564 of file Bitmap.cpp.
void Bitmap::MakeTexture | ( | ) |
Definition at line 648 of file Bitmap.cpp.
|
virtual |
Definition at line 116 of file Bitmap.cpp.
|
inline |
|
virtual |
Definition at line 122 of file Bitmap.cpp.
int Bitmap::RowSize | ( | ) | const |
Definition at line 110 of file Bitmap.cpp.
void Bitmap::ScaleTo | ( | int | w, |
int | h | ||
) |
Definition at line 490 of file Bitmap.cpp.
void Bitmap::SetColor | ( | int | x, |
int | y, | ||
Color | c | ||
) |
Definition at line 760 of file Bitmap.cpp.
void Bitmap::SetFilename | ( | const char * | s | ) |
Definition at line 778 of file Bitmap.cpp.
void Bitmap::SetIndex | ( | int | x, |
int | y, | ||
ColorIndex | c | ||
) |
Definition at line 742 of file Bitmap.cpp.
|
protected |