From f5da05f80d0a24ccb3e77ae5740c89ebed4cc2fe Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 25 Nov 2004 23:33:21 +0000 Subject: Added some graphic primitives svn-id: r15885 --- graphics/surface.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'graphics/surface.h') diff --git a/graphics/surface.h b/graphics/surface.h index a45df31748..510a5c274c 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -22,6 +22,7 @@ #define GRAPHICS_SURFACE_H #include "common/scummsys.h" +#include "common/rect.h" namespace Graphics { @@ -37,6 +38,15 @@ struct Surface { uint16 pitch; uint8 bytesPerPixel; Surface() : pixels(0), w(0), h(0), pitch(0), bytesPerPixel(0) {} + + inline void *getBasePtr(int x, int y) const { + return (void *)((byte *)pixels + y * pitch + x * bytesPerPixel); + } + + void hLine(int x, int y, int x2, uint32 color) const; + void vLine(int x, int y, int y2, uint32 color) const; + void fillRect(const Common::Rect &r, uint32 color) const; + void frameRect(const Common::Rect &r, uint32 color) const; }; -- cgit v1.2.3