#include <graphics.h>
Definition at line 70 of file graphics.h.
Public Member Functions | |
Graphics () | |
Constructor. | |
virtual | ~Graphics () |
Destructor. | |
virtual bool | setVideoMode (int w, int h, int bpp, bool fs, bool hwaccel) |
Try to create a window with the given settings. | |
bool | setFullscreen (bool fs) |
Set fullscreen mode. | |
bool | drawImage (Image *image, int x, int y) |
Blits an image onto the screen. | |
void | drawImage (gcn::Image const *image, int srcX, int srcY, int dstX, int dstY, int width, int height) |
Overrides with our own drawing method. | |
virtual bool | drawImage (Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height, bool useColor=false) |
Blits an image onto the screen. | |
virtual void | drawImagePattern (Image *image, int x, int y, int w, int h) |
void | drawImageRect (int x, int y, int w, int h, Image *topLeft, Image *topRight, Image *bottomLeft, Image *bottomRight, Image *top, Image *right, Image *bottom, Image *left, Image *center) |
Draws a rectangle using images. | |
void | drawImageRect (int x, int y, int w, int h, const ImageRect &imgRect) |
Draws a rectangle using images. | |
virtual void | updateScreen () |
Updates the screen. | |
int | getWidth () const |
Returns the width of the screen. | |
int | getHeight () const |
Returns the height of the screen. | |
virtual SDL_Surface * | getScreenshot () |
Takes a screenshot and returns it as SDL surface. | |
Protected Attributes | |
SDL_Surface * | mScreen |
bool | mFullscreen |
bool | mHWAccel |
Graphics::Graphics | ( | ) |
Graphics::~Graphics | ( | ) | [virtual] |
bool Graphics::setVideoMode | ( | int | w, | |
int | h, | |||
int | bpp, | |||
bool | fs, | |||
bool | hwaccel | |||
) | [virtual] |
Try to create a window with the given settings.
Reimplemented in OpenGLGraphics.
Definition at line 40 of file graphics.cpp.
bool Graphics::setFullscreen | ( | bool | fs | ) |
bool Graphics::drawImage | ( | Image * | image, | |
int | x, | |||
int | y | |||
) |
Blits an image onto the screen.
true
if the image was blitted properly false
otherwise. Definition at line 118 of file graphics.cpp.
void Graphics::drawImage | ( | gcn::Image const * | image, | |
int | srcX, | |||
int | srcY, | |||
int | dstX, | |||
int | dstY, | |||
int | width, | |||
int | height | |||
) |
bool Graphics::drawImage | ( | Image * | image, | |
int | srcX, | |||
int | srcY, | |||
int | dstX, | |||
int | dstY, | |||
int | width, | |||
int | height, | |||
bool | useColor = false | |||
) | [virtual] |
Blits an image onto the screen.
true
if the image was blitted properly false
otherwise. Reimplemented in OpenGLGraphics.
Definition at line 123 of file graphics.cpp.
void Graphics::drawImagePattern | ( | Image * | image, | |
int | x, | |||
int | y, | |||
int | w, | |||
int | h | |||
) | [virtual] |
void Graphics::drawImageRect | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
Image * | topLeft, | |||
Image * | topRight, | |||
Image * | bottomLeft, | |||
Image * | bottomRight, | |||
Image * | top, | |||
Image * | right, | |||
Image * | bottom, | |||
Image * | left, | |||
Image * | center | |||
) |
Draws a rectangle using images.
4 corner images, 4 side images and 1 image for the inside.
Definition at line 187 of file graphics.cpp.
void Graphics::drawImageRect | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
const ImageRect & | imgRect | |||
) |
Draws a rectangle using images.
4 corner images, 4 side images and 1 image for the inside.
Definition at line 230 of file graphics.cpp.
void Graphics::updateScreen | ( | ) | [virtual] |
Updates the screen.
This is done by either copying the buffer to the screen or swapping pages.
Reimplemented in OpenGLGraphics.
Definition at line 239 of file graphics.cpp.
int Graphics::getWidth | ( | ) | const |
int Graphics::getHeight | ( | ) | const |
SDL_Surface * Graphics::getScreenshot | ( | ) | [virtual] |
Takes a screenshot and returns it as SDL surface.
Reimplemented in OpenGLGraphics.
Definition at line 244 of file graphics.cpp.
SDL_Surface* Graphics::mScreen [protected] |
Definition at line 165 of file graphics.h.
bool Graphics::mFullscreen [protected] |
Definition at line 166 of file graphics.h.
bool Graphics::mHWAccel [protected] |
Definition at line 166 of file graphics.h.