Newer to using emWin, but I am trying to follow an example and do not understand why this is not working. I am not sure if it is a limitation or user error.
I am trying to draw a single Char with a Memory Device, rotate it and display it. This works well until I try to make it transparent. My end goal is to create text along a curve/arc.
I am using a NXP LPC4357. Below is the code I currently have:
Display All
Changing GUI_MEMDEV_NOTRANS to GUI_MEMDEV_HASTRANS works for the Source but when rotating and putting into the Destination, the Destination does not display correctly. (Also this is a stripped down version of the example for rotate in the documentation).
Suggestions?
Thank you.
I am trying to draw a single Char with a Memory Device, rotate it and display it. This works well until I try to make it transparent. My end goal is to create text along a curve/arc.
I am using a NXP LPC4357. Below is the code I currently have:
C Source Code
- GUI_MEMDEV_Handle hMemSource;
- GUI_MEMDEV_Handle hMemDest;
- GUI_RECT RectSource = {0, 0, 24, 20};
- GUI_RECT RectDest = {0, 0, 24, 22};
- GUI_SetColor(GUI_BLUE);
- GUI_FillRect(0,0,320,240);
- 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, GUICC_8888);
- 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, GUICC_8888);
- GUI_MEMDEV_Select(hMemSource);
- GUI_SetColor(GUI_WHITE);
- GUI_SetFont(&GUI_Font20B_ASCII);
- GUI_SetTextMode(GUI_TEXTMODE_TRANS);
- GUI_DispCharAt('A',(RectSource.x1 + RectSource.x0)/2-7,(RectSource.y1 + RectSource.y0)/2-14);
- GUI_MEMDEV_RotateHQ(hMemSource, hMemDest,
- (RectDest.x1 - RectSource.x1) / 2,
- (RectDest.y1 - RectSource.y1) / 2,
- 45 * 1000,
- 1000);
- GUI_MEMDEV_CopyToLCDAt(hMemSource, 10, (RectDest.y1 - RectSource.y1) / 2);
- GUI_MEMDEV_CopyToLCDAt(hMemDest, 160, 120);
Changing GUI_MEMDEV_NOTRANS to GUI_MEMDEV_HASTRANS works for the Source but when rotating and putting into the Destination, the Destination does not display correctly. (Also this is a stripped down version of the example for rotate in the documentation).
Suggestions?
Thank you.