#include <GraphicContext.h>
Inheritance diagram for GAG::DrawableSurface:
Public Types | |
enum | Alpha { ALPHA_TRANSPARENT = 0, ALPHA_OPAQUE = 255 } |
Specific alpha values. More... | |
enum | ResolutionFlags { DEFAULT = 0, DOUBLEBUF = 1, FULLSCREEN = 2, HWACCELERATED = 4, RESIZABLE = 8 } |
Flags for surface. More... | |
Public Member Functions | |
virtual | ~DrawableSurface (void) |
Virtual destructor, do nothing. | |
virtual bool | setRes (int w, int h, int depth=32, Uint32 flags=DEFAULT)=0 |
Set the resolution. | |
virtual void | setAlpha (bool usePerPixelAlpha=false, Uint8 alphaValue=ALPHA_OPAQUE)=0 |
Set the alpha properties of the surface. | |
virtual int | getW (void)=0 |
Return the width of the surface. | |
virtual int | getH (void)=0 |
Return the height of the surface. | |
virtual int | getDepth (void)=0 |
Return the depth of the surface. | |
virtual int | getFlags (void)=0 |
Return the flags of the surface. | |
virtual void | setClipRect (int x, int y, int w, int h)=0 |
Set the clipping rectangle. | |
virtual void | setClipRect (void)=0 |
Clear the clipping rectangle (set it to surface dimension). | |
virtual void | loadImage (const char *name)=0 |
Load image name on the surface. | |
virtual void | drawSprite (int x, int y, Sprite *sprite, int index=0)=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)=0 |
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)=0 |
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)=0 |
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)=0 |
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)=0 |
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)=0 |
Draw a line from (x1,y1) to (x2,y2) using color (r,g,b,a). | |
virtual void | drawCircle (int x, int y, int ray, Uint8 r, Uint8 g, Uint8 b, Uint8 a=ALPHA_OPAQUE)=0 |
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)=0 |
Draw text of value i at (x,y) using font. | |
virtual void | drawString (int x, int y, const Font *font, const char *msg)=0 |
Draw msg at (x,y) using font. | |
virtual void | drawString (int x, int y, int w, const Font *font, const char *msg)=0 |
Draw msg from (x,y) with width w using font. | |
virtual void | drawSurface (int x, int y, DrawableSurface *surface)=0 |
Draw surface at (x,y). | |
virtual void | updateRects (SDL_Rect *rects, int size)=0 |
Blit to screen rectangles rects, which is an array of length size. | |
virtual void | updateRect (int x, int y, int w, int h)=0 |
Blit to screen rectangle from (x,y) to (x+w,y+h). | |
virtual void * | getPixelPointer (void)=0 |
Return a pointer to pixels of the underlying surface. |
|
Specific alpha values.
|
|
Flags for surface.
|