初级会员
- 积分
- 95
- 金钱
- 95
- 注册时间
- 2020-7-23
- 在线时间
- 33 小时
|
1金钱
直接用手册例程 可以旋转并且显示,代码如下
GUI_MEMDEV_Handle hMemSource;
GUI_MEMDEV_Handle hMemDest;
GUI_RECT RectSource = { 0, 0, 69, 39 };
GUI_RECT RectDest = { 0, 0, 79, 79 };
hMemSource = GUI_MEMDEV_CreateFixed(RectSource.x0, RectSource.y0,
RectSource.x1 - RectSource.x0 + 1,
RectSource.y1 - RectSource.y0 + 1,
GUI_MEMDEV_NOTRANS,
GUI_MEMDEV_APILIST_32, GUI_COLOR_CONV_888);
hMemDest = GUI_MEMDEV_CreateFixed(RectDest.x0, RectDest.y0,
RectDest.x1 - RectDest.x0 + 1,
RectDest.y1 - RectDest.y0 + 1,
GUI_MEMDEV_NOTRANS,
GUI_MEMDEV_APILIST_32, GUI_COLOR_CONV_888);
GUI_MEMDEV_Select(hMemSource);
GUI_DrawGradientV(RectSource.x0, RectSource.y0,
RectSource.x1, RectSource.y1,
GUI_WHITE, GUI_DARKGREEN);
GUI_SetColor(GUI_BLUE);
GUI_SetFont(&GUI_Font20B_ASCII);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("emWin", &RectSource, GUI_TA_HCENTER | GUI_TA_VCENTER);
GUI_DrawRect(0, 0, RectSource.x1, RectSource.y1);
GUI_MEMDEV_Select(hMemDest);
GUI_Clear();
GUI_MEMDEV_Select(0);
GUI_MEMDEV_RotateHQ(hMemSource, hMemDest,
(RectDest.x1 - RectSource.x1) / 2,
(RectDest.y1 - RectSource.y1) / 2,
30 * 1000,
1000);
GUI_MEMDEV_CopyToLCDAt(hMemSource, 10, (RectDest.y1 - RectSource.y1) / 2);
GUI_MEMDEV_CopyToLCDAt(hMemDest, 100, 0);
但是把
hMemSource = GUI_MEMDEV_CreateFixed(RectSource.x0, RectSource.y0,
RectSource.x1 - RectSource.x0 + 1,
RectSource.y1 - RectSource.y0 + 1,
GUI_MEMDEV_NOTRANS,
GUI_MEMDEV_APILIST_1, GUI_COLOR_CONV_1);
hMemDest = GUI_MEMDEV_CreateFixed(RectDest.x0, RectDest.y0,
RectDest.x1 - RectDest.x0 + 1,
RectDest.y1 - RectDest.y0 + 1,
GUI_MEMDEV_NOTRANS,
GUI_MEMDEV_APILIST_1, GUI_COLOR_CONV_1);
改成这样 就不能显示了,有遇到过这样的问题的朋友吗
|
|