📄 bitmap.h
字号:
#ifndef BITMAP_H
#define BITMAP_H
#include "stdint.h"
typedef struct xTBitmap
{
u32 *pxData;
u16 uiSizeX;
u16 uiSizeY;
} xTBitmap;
typedef struct xTMaskedBitmap
{
u16 *pxData;
u32 *pxMask;
u16 uiSizeX;
u16 uiSizeY;
} xTMaskedBitmap;
typedef struct xTFont
{
u32 *pxData; //Each character has whole numbet of words. Maximum width - 16 pixels
u16 uiSizeX;
u16 uiSizeY;
} xTFont;
typedef struct xTRectangle
{
u16 x1, x2, y1, y2;
} xTRectangle;
void wSetPixel (xTBitmap *pxBitmap, u32 x, u32 y, u16 uxColor);
void wClear (xTBitmap *pxBitmap, u16 color);
void wFloodFill (xTBitmap *pxBitmap,
xTRectangle *pxRectangle,
u32 uxShift,
u16 color);
void wDrawChar(xTBitmap *pxBitmap,
xTFont *pxFont,
u08 c, u32 x, u32 y, u16 color);
void wDrawString(xTBitmap *pxBitmap,
xTFont *pxFont,
u08* s,
xTRectangle *pxRectangle,
u32 uxShift,
u16 color);
void wDrawStringL(xTBitmap *pxBitmap,
xTFont *pxFont,
u08* s,
xTRectangle *pxRectangle,
u32 uxShift,
u32 ulLength,
u16 color);
void wDrawHex32 (xTBitmap *pxBitmap,
xTFont *pxFont,
u32 s,
xTRectangle *pxRectangle,
u32 uxShift,
u16 color);
void wDrawHex8 (xTBitmap *pxBitmap,
xTFont *pxFont,
u32 s,
xTRectangle *pxRectangle,
u32 uxShift,
u16 color);
void wDrawNumber (xTBitmap *pxBitmap,
xTFont *pxFont,
u32 s,
u32 c,
xTRectangle *pxRectangle,
u32 uxShift,
u16 color);
/*===========================================================*/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -