18 lines
915 B
C
Raw Normal View History

2019-02-02 11:30:40 +08:00
#ifndef BITMAP_UNIT_H
#define BITMAP_UNIT_H
2017-12-06 21:43:47 +08:00
2019-02-20 12:55:27 +08:00
#define DEFAULT_MASK_COLOR 0xFF080408
2017-12-06 21:43:47 +08:00
class c_surface;
class c_bitmap
{
public:
2019-02-20 12:55:27 +08:00
static void draw_bitmap(c_surface* surface, int z_order, const BITMAP_INFO *pBitmap, int x, int y, unsigned int mask_rgb = DEFAULT_MASK_COLOR);
static void draw_bitmap_in_rect(c_surface* surface, int z_order, const BITMAP_INFO *pBitmap, c_rect rect, unsigned int align_type, unsigned int mask_rgb = DEFAULT_MASK_COLOR);
2017-12-06 21:43:47 +08:00
private:
2019-02-20 12:55:27 +08:00
static void draw_bitmap_565(c_surface* surface, int z_order, int x, int y, int xsize, int ysize, const unsigned char* pPixel, unsigned int mask_color);
2018-10-04 14:30:29 +08:00
static void get_bitmap_pos(const BITMAP_INFO *pBitmap, c_rect rect, unsigned int align_type, int &x, int &y);
2019-02-20 12:55:27 +08:00
static void draw_bitmap_565_in_rect(c_surface* surface, int z_order, int x, int y, int width, int height, int xsize, int ysize, const unsigned char* pPixel, unsigned int mask_color);
2017-12-06 21:43:47 +08:00
};
#endif