cancel
Showing results for 
Search instead for 
Did you mean: 

LCD.blitCopy parameters.

FTkal.1
Associate II

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?

4 REPLIES 4
Romain DIELEMAN
ST Employee

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

FTkal.1
Associate II

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.

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?

FTkal.1
Associate II

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)