Public Member Functions | |
unsigned | width () const |
unsigned | height () const |
void | swap (Bitmap &other) |
void | resize (unsigned width, unsigned height, Color c=Colors::none) |
void | fill (Color c) |
void | replace (Color oldColor, Color newColor) |
Color | getPixel (unsigned x, unsigned y) const |
void | setPixel (unsigned x, unsigned y, Color c) |
void | insert (const Bitmap &source, int x, int y) |
void | insert (const Bitmap &source, int x, int y, unsigned srcX, unsigned srcY, unsigned srcWidth, unsigned srcHeight) |
const unsigned * | glCompatibleData () const |
Provides minimal drawing functionality and serves as a temporary holder for graphical resources which are usually turned into Images later. Has (expensive) value semantics.
Color Gosu::Bitmap::getPixel | ( | unsigned | x, | |
unsigned | y | |||
) | const [inline] |
Returns the color at the specified position.
x and y must be on the bitmap.
void Gosu::Bitmap::setPixel | ( | unsigned | x, | |
unsigned | y, | |||
Color | c | |||
) | [inline] |
Sets the pixel at the specified position to a color.
x and y must be on the bitmap.
void Gosu::Bitmap::insert | ( | const Bitmap & | source, | |
int | x, | |||
int | y | |||
) |
Inserts a bitmap at the given position.
Parts of the inserted bitmap that would be outside of the target bitmap will be clipped away.
void Gosu::Bitmap::insert | ( | const Bitmap & | source, | |
int | x, | |||
int | y, | |||
unsigned | srcX, | |||
unsigned | srcY, | |||
unsigned | srcWidth, | |||
unsigned | srcHeight | |||
) |
Inserts a portion of a bitmap at the given position.
Parts of the inserted bitmap that would be outside of the target bitmap will be clipped away.
const unsigned* Gosu::Bitmap::glCompatibleData | ( | ) | const [inline] |
Undocumented optimization for Image creation; to be changed.