bitmap.h
来自「An complete pmp solution for mattel juic」· C头文件 代码 · 共 77 行
H
77 行
#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 + =
减小字号Ctrl + -
显示快捷键?