2020-07-21 08:19 PM
Can anyone explain to me what the parameters to LCD.blitCopy are?
The online help seems to suggest all of the parameters describe the source - sourceData, sourceFormat, source and blitRect all describe the source data. How do I specify the destination?
2020-07-22 12:42 AM
Hi,
The blitCopy function copies a block of data to the framebuffer, which you know and can define the address.
Do you wish to copy it outside of it? What are you trying to achieve?
/Romain
2020-07-22 01:59 PM
I was extending the Image widget to display the bitmap flipped horizontally or vertically. I wanted to be able to fill a buffer, one scanline at a time, and copy it directly to the framebuffer.
2020-07-23 01:17 AM
If i understand correctly you are trying to rotate your image . Have you tried the using the texture mapper widget? This widget allows you do display rotated/scaled images to have some fancy animations. Would this be enough for what you are trying to achieve?
2020-07-23 11:51 PM
No, that won't work because I'm trying to mirror, not rotate.
Because I couldn't work out how to use blitCopy, I've been using drawPartialBitmap to draw one line at a time in reverse - ymax down to ymin, to mirror vertically. But I can't get get horizontal mirroring working, where I need to swap the pixels in a line, and then draw that. To mirror X, I've created a working bitmap of size DISPLAY_WIDTH x 1, then write directly into the bitmap memory buffer returned by dynamicBitmapGetAddress() , then call drawPartialBitmap and repeating for each line.
I don't know if blitCopy will be suitable because some of my bitmaps have transparency (I use both RGB888 and ARGB8888)