summaryrefslogtreecommitdiff
path: root/src/image.h
blob: cdc13e078a6eb17436e2e0eb3a43de4aa6502c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef IMAGE_H
#define IMAGE_H

#include <stdint.h>

class Image
{
public:
    Image();
    Image( int32_t iWidth, int32_t iHeight );
    virtual ~Image();

    void clear( uint8_t uColor=0 );
    void set( int32_t x, int32_t y, uint8_t iCol );

    void save( const char *sPath, class Palette &rPal );
    void drawText( class Font &rFnt, int32_t x, int32_t y, uint8_t uColor,
            const char *sText );
    void drawLine( int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint8_t uColor );

private:
    int32_t iWidth;
    int32_t iHeight;
    uint8_t *pPix;
};

#endif