W wl Well-Known Member Licensed User Longtime User Jul 7, 2020 #1 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: Jul 7, 2020
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
B Brian Dean Well-Known Member Licensed User Longtime User Jul 7, 2020 #2 Something like an overlay ? Click to expand... 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 overdraw.zip 18.9 KB · Views: 254 Last edited: Jul 7, 2020 Upvote 0
Something like an overlay ? Click to expand... 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.]