diff options
author | Max Horn | 2005-05-08 21:24:33 +0000 |
---|---|---|
committer | Max Horn | 2005-05-08 21:24:33 +0000 |
commit | 315943f19a3d7b9acb64e9fb8b7e1587d81c1ae5 (patch) | |
tree | c1ab2da9c01c134176a671efd074940c25552962 /graphics/surface.h | |
parent | cf936916db8375a504ec8e10ff478cd8827b059d (diff) | |
download | scummvm-rg350-315943f19a3d7b9acb64e9fb8b7e1587d81c1ae5.tar.gz scummvm-rg350-315943f19a3d7b9acb64e9fb8b7e1587d81c1ae5.tar.bz2 scummvm-rg350-315943f19a3d7b9acb64e9fb8b7e1587d81c1ae5.zip |
Added convenience methods create/free to Graphics::Surface (part of patch #1163026)
svn-id: r17973
Diffstat (limited to 'graphics/surface.h')
-rw-r--r-- | graphics/surface.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/surface.h b/graphics/surface.h index ce3596b364..fcdadf3b4a 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -47,6 +47,17 @@ struct Surface { return static_cast<void *>(static_cast<byte *>(pixels) + y * pitch + x * bytesPerPixel); } + /** + * Allocate pixels memory for this surface and for the specified dimension. + */ + void create(uint16 width, uint16 height, uint8 bytesPP); + + /** + * Release the memory used by the pixels memory of this surface. This is the + * counterpart to create(). + */ + void free(); + void drawLine(int x0, int y0, int x1, int y1, uint32 color); void hLine(int x, int y, int x2, uint32 color); void vLine(int x, int y, int y2, uint32 color); |