Hi everyone.
I am using FT811 chip and ran into a problem how to use CMD_SCALE correctly to get images larger than 511x511 pixels.
The display witch i'm using has 800х600 pixels and working with Bitmaps I add BITMAP_LAYOUT_H and BITMAP_SIZE_H.
Everything works correctly and I can upload images with a resolution greater than 512x512.
But if I use the SCALE() command to resize an image to get over than 511x511, for example the image 160x120 with scale factor of 4, the picture is cropped as if I havn't used BITMAP_LAYOUT_H and BITMAP_SIZE_H at all.
Here is the code, please tell me what I do wrong?
int16_t imgWidth = 160;
int16_t imgHeight = 120;
App_WrCoCmd_Buffer(phost,COLOR_RGB(255,255,255));
App_WrCoCmd_Buffer(phost,BITMAP_SOURCE(0));
App_WrCoCmd_Buffer(phost,BITMAP_LAYOUT(RGB565,imgWidth*2,imgHeight));
App_WrCoCmd_Buffer(phost,BITMAP_LAYOUT_H((imgWidth*2)>>10,imgHeight>>9));
App_WrCoCmd_Buffer(phost,BITMAP_SIZE(NEAREST,BORDER,BORDER,imgWidth,imgHeight));
App_WrCoCmd_Buffer(phost,BITMAP_SIZE_H(imgWidth>>9,imgHeight>>9));
App_WrCoCmd_Buffer(phost,BEGIN(BITMAPS)); // start drawing bitmaps
Gpu_CoCmd_LoadIdentity(phost);
Gpu_CoCmd_Scale(phost,4*65536, 4*65536);
Gpu_CoCmd_SetMatrix(phost);
App_WrCoCmd_Buffer(phost,VERTEX2F(0,0));
App_WrCoCmd_Buffer(phost, END());