Android Question Changing polygon on a image

wl

Well-Known Member
Licensed User
Longtime User
I would like to create a (filled) polygon (triangle) that (partly) covers an image being displayed (background).
The polygon would change every few instances, so the part of the image being covered/not covered by the polygon would change.
I also would like to avoid any flickering while the polygon is being redrawn.

What would be the best approach to do so (it should be drawn very fast so fully reloading the image seems nog option) ? Something like an overlay ?

Thanks
 
Last edited:

Brian Dean

Well-Known Member
Licensed User
Longtime User
Something like an overlay ?

That is what I would try first. Overlay the image with a transparent panel and draw on the panel's canvas. If the overdrawn shape is simple I would not expect to see any flicker. Why don't you try that?

[Edit : Here is a demonstration. It looks fine to me - very smooth except for a tiny effect due to persistence of vision. But you can see for yourself.]
 

Attachments

  • overdraw.zip
    18.9 KB · Views: 85
Last edited:
Upvote 0
Top