#include <SDLGraphicContext.h>
Inheritance diagram for GAG::SDLDrawableSurface:
Public Member Functions | |
virtual bool | setRes (int w, int h, int depth=32, Uint32 flags=DEFAULT) |
Set the resolution. | |
virtual void | setAlpha (bool usePerPixelAlpha=false, Uint8 alphaValue=ALPHA_OPAQUE) |
Set the alpha properties of the surface. | |
virtual int | getW (void) |
Return the width of the surface. | |
virtual int | getH (void) |
Return the height of the surface. | |
virtual int | getDepth (void) |
Return the depth of the surface. | |
virtual int | getFlags (void) |
Return the flags of the surface. | |
virtual void | setClipRect (int x, int y, int w, int h) |
Set the clipping rectangle. | |
virtual void | setClipRect (void) |
Clear the clipping rectangle (set it to surface dimension). | |
virtual void | loadImage (const char *name) |
Load image name on the surface. | |
virtual void | drawSprite (int x, int y, Sprite *sprite, int index=0) |
Draw sprite frame index at (x,y). | |
virtual void | drawPixel (int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8 a=ALPHA_OPAQUE) |
Set pixel (x,y) to color (r,g,b,a). | |
virtual void | drawRect (int x, int y, int w, int h, Uint8 r, Uint8 g, Uint8 b, Uint8 a=ALPHA_OPAQUE) |
Draw an empty rectangle from (x,y) to (x+w,y+h) using color (r,g,b,a). | |
virtual void | drawFilledRect (int x, int y, int w, int h, Uint8 r, Uint8 g, Uint8 b, Uint8 a=ALPHA_OPAQUE) |
Draw a filled rectangle from (x,y) to (x+w,y+h) using color (r,g,b,a). | |
virtual void | drawVertLine (int x, int y, int l, Uint8 r, Uint8 g, Uint8 b, Uint8 a=ALPHA_OPAQUE) |
Draw a vertical line from (x,y) to (x,y+l) using color (r,g,b,a). | |
virtual void | drawHorzLine (int x, int y, int l, Uint8 r, Uint8 g, Uint8 b, Uint8 a=ALPHA_OPAQUE) |
Draw a horizonzal line from (x,y) to (x+l,y) using color (r,g,b,a). | |
virtual void | drawLine (int x1, int y1, int x2, int y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a=ALPHA_OPAQUE) |
virtual void | drawCircle (int x, int y, int ray, Uint8 r, Uint8 g, Uint8 b, Uint8 a=ALPHA_OPAQUE) |
Draw an empty circle of radius ray centered in (x,y) using color (r,g,b,a). | |
virtual void | drawString (int x, int y, const Font *font, int i) |
Draw text of value i at (x,y) using font. | |
virtual void | drawString (int x, int y, const Font *font, const char *msg) |
Draw msg at (x,y) using font. | |
virtual void | drawString (int x, int y, int w, const Font *font, const char *msg) |
Draw msg from (x,y) with width w using font. | |
virtual void | drawSurface (int x, int y, DrawableSurface *surface) |
Draw surface at (x,y). | |
virtual void | updateRects (SDL_Rect *rects, int size) |
Blit to screen rectangles rects, which is an array of length size. | |
virtual void | updateRect (int x, int y, int w, int h) |
Blit to screen rectangle from (x,y) to (x+w,y+h). | |
virtual void * | getPixelPointer (void) |
Return a pointer to pixels of the underlying surface. | |
Protected Member Functions | |
SDLDrawableSurface () | |
Private constructor, created by GraphicContext. | |
Protected Attributes | |
SDL_Surface * | surface |
the underlying SDL surface | |
SDL_Rect | clipRect |
clipping rectangle | |
Uint32 | flags |
flags for this surface | |
Friends | |
class | SDLSprite |
class | SDLGraphicContext |
|
Return the signe of x Implements GAG::DrawableSurface. |