2019-11-13 11:40 AM
I need to draw part of an image. I found the following function:
I have tried the image.draw() method and it does work. However, I am having issues with it because I am placing a progress widget behind it which invalidates that area and essentially wipes out the drawn image.
I have tried calling draw() after advancing the progress value of the widget, but it flickers. And calling image.invalidate() displays the entire image (not the partial rectangle set by the draw() method.
2019-11-13 01:57 PM
I have tried the HAL method drawDrawableInDynamicBitmap() to copy part of the Image drawable into a Dynamic Bitmap and then use this dynamic bitmap in a new image.
This works if the images are setup as RGB565 but not other formats. I assume this is because RGB565 is the format being used inside the Image widget before being copied to the frame buffer?
I would like to use the new L8_ARGB8888 for Dynamic Bitmaps and then be able to copy part of L8_ARGB8888 images into them. Is this possible with the TouchGFX framework, or am I going to have to write my own?
2019-11-15 04:53 AM
Hi,
If you want to only invalidate a certain area of a image, you can use invalidateRect(Rect& invalidatedArea), which invalidates the area specifies by a Rect and as with draw, the are that is invalidated based on the Rect's properties which is relative to the image
/Emil