diff options
| author | Mike Buland <mike@xagasoft.com> | 2015-04-08 08:40:05 -0600 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2015-04-08 08:40:05 -0600 |
| commit | f314041b6b37bb9274d9fc79946858341befa0f2 (patch) | |
| tree | 3ad385b2bdedeb367ae8b26341d7044c340dc153 /src/image.h | |
| parent | 518619603ab3c49b7fdfcf19c439c1a30668164f (diff) | |
| download | lost-f314041b6b37bb9274d9fc79946858341befa0f2.tar.gz lost-f314041b6b37bb9274d9fc79946858341befa0f2.tar.bz2 lost-f314041b6b37bb9274d9fc79946858341befa0f2.tar.xz lost-f314041b6b37bb9274d9fc79946858341befa0f2.zip | |
Added image goo + font support.
Diffstat (limited to '')
| -rw-r--r-- | src/image.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/image.h b/src/image.h new file mode 100644 index 0000000..cdc13e0 --- /dev/null +++ b/src/image.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #ifndef IMAGE_H | ||
| 2 | #define IMAGE_H | ||
| 3 | |||
| 4 | #include <stdint.h> | ||
| 5 | |||
| 6 | class Image | ||
| 7 | { | ||
| 8 | public: | ||
| 9 | Image(); | ||
| 10 | Image( int32_t iWidth, int32_t iHeight ); | ||
| 11 | virtual ~Image(); | ||
| 12 | |||
| 13 | void clear( uint8_t uColor=0 ); | ||
| 14 | void set( int32_t x, int32_t y, uint8_t iCol ); | ||
| 15 | |||
| 16 | void save( const char *sPath, class Palette &rPal ); | ||
| 17 | void drawText( class Font &rFnt, int32_t x, int32_t y, uint8_t uColor, | ||
| 18 | const char *sText ); | ||
| 19 | void drawLine( int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint8_t uColor ); | ||
| 20 | |||
| 21 | private: | ||
| 22 | int32_t iWidth; | ||
| 23 | int32_t iHeight; | ||
| 24 | uint8_t *pPix; | ||
| 25 | }; | ||
| 26 | |||
| 27 | #endif | ||
