个位我最近在用STemWin 开发一个UI. 文字,线条都能显示但是BMP图片却不能显示。请高手指点一下。
这一段是调用STemWin库函数显示文字图片:
extern GUI_BITMAP bmProducts_Standard_Filter;
void Page_Two_Init()
{
GUI_RECT myRect = {0,17,319,30};
//clear window
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
//"FILTER CONFIGURATION"
GUI_SetFont(&GUI_FontCalibri_13_Bold);
GUI_SetColor(GUI_WHITE);
GUI_DispStringInRect("PAGE II", &myRect, GUI_TA_VCENTER | GUI_TA_HCENTER);
GUI_BMP_Draw(&bmProducts_Standard_Filter,33,46);
}
这一段是BMP文件:
GUI_CONST_STORAGE GUI_BITMAP bmProducts_Standard_Filter = {
138, // xSize
158, // ySize
276, // BytesPerLine
16, // BitsPerPixel
(unsigned char *)_acProducts_Standard_Filter, // Pointer to picture data
NULL, // Pointer to palette
GUI_DRAW_BMPM565
};
此帖出自
小平头技术问答
一周热门 更多>