Skip to main content
FTkal.1
Associate II
July 22, 2020
Question

LCD.blitCopy parameters.

  • July 22, 2020
  • 4 replies
  • 1073 views

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?

This topic has been closed for replies.

4 replies

Romain DIELEMAN
ST Employee
July 22, 2020

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
FTkal.1Author
Associate II
July 22, 2020

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.

Romain DIELEMAN
ST Employee
July 23, 2020

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
FTkal.1Author
Associate II
July 24, 2020

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)