2015-10-28 06:07 AM
void MainTask(void) {
int i,j;
GUI_Clear();
GUI_SetFont(&GUI_Font20_1);
GUI_DispStringAt(''Hello world!'', (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2);
// GUI_CopyRect here should copy the phrase 50 pixels below, yet it does nothing
GUI_CopyRect((LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2,
(LCD_GetXSize()-100)/2, 50 + (LCD_GetYSize()-20)/2, 100, 20);
while(1);
}
Can someone tell me please how can we make the GUI_CopyRect work properly?
Regards,
2015-10-29 09:46 AM
Hinikolaou.christos,
In LCD configuration file (LCDConf.c) please change “CUSTOM_CopyRect�? API by the following one:/**
* @brief Copy rectangle
* @param LayerIndex : Layer Index
* @param x0: X0 position
* @param y0: Y0 position
* @param x1: X1 position
* @param y1: Y1 position
* @param xSize: X size.
* @param ySize: Y size.
* @retval None.
*/
static void CUSTOM_CopyRect(int LayerIndex, int x0, int y0, int x1, int y1, int xSize, int ySize)
{
U32 AddrSrc, AddrDst;
AddrSrc = layer_prop[LayerIndex].address + (y0 * layer_prop[LayerIndex].xSize + x0) * layer_prop[LayerIndex].BytesPerPixel;
AddrDst = layer_prop[LayerIndex].address + (y1 * layer_prop[LayerIndex].xSize + x1) * layer_prop[LayerIndex].BytesPerPixel;
DMA2D_CopyBuffer(LayerIndex, (void *)AddrSrc, (void *)AddrDst, xSize, ySize, layer_prop[LayerIndex].xSize - xSize, layer_prop[LayerIndex].xSize - xSize);
}
Thank you for your feedback,
-Shahrzad-
2015-10-29 10:29 AM
Dear Shahrzad,
Thank you for the swift answer. Did replace the old custom function with the new one and it does work properly. If there is any update on the other remaining 3 custom functions please let me know so (FillRect, CopyBuffer,DrawBitmap32bpp) as it seems that they might have the same issues although have not tested them yet. Thank you again. Christos2015-11-02 07:38 AM
Hi nikolaou.christos,
Other functions (FillRect, CopyBuffer,DrawBitmap32bpp) are correct. You can use them.-Shahrzad-2015-11-02 07:58 AM
Ok Shahrzad,
Thank you for the update Christos