Content originally posted in LPCWare by Wouter on Thu Jul 04 01:58:46 MST 2013I see what you mean. It looks like the memory devices do not support an additional alpha/transparency layer. The transparency option on memory devices simply works by keeping track which pixel are updates, and only copy the pixels which have changed. This works fine for all standard drawing operations (e.g. line, circle etc.), but not for images with transparency since all pixels are updated in that case.
If the background (where the transparent pixels of the image would be) is static during runtime, you could copy the content of the display to the memory device before drawing the png with transparency layer. This way the transparency layer of the png is taken into account.
I've created a simple example showing how to do this, see below
<code>hMem1 = GUI_MEMDEV_Create(0, 0, 193, 112); /* Create memdev with size of PNG image */hWin = CreateFramewin(); /* Create GUI */GUI_Exec(); /* Make sure GUI is drawn to LCD */GUI_MEMDEV_CopyFromLCD(hMem1); /* Copy LCD to memdev */GUI_MEMDEV_Select(hMem1); /* Select memdev */GUI_PNG_DrawEx(&GetData, (void*)_acImage_0, 0, 0); /* Draw PNG with transparency layer to memdev, GUI is used as background */hFrameWin = WM_GetFirstChild(hWin); /* Get handle of FrameWin */WM_SelectWindow(hFrameWin); /* Select FrameWin */GUI_MEMDEV_CopyToLCD(hMem1); /* Draw memdev to FrameWin*/while(1){ GUI_Delay(100);}</code>