We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I am trying to create a sort of mirror effect so that when I draw in a certain area it is then captured, transformed and finally copied to a specific area of my display.
Of course my first idea was to use the copy() or blend() functions but unfortunately it is a straight copy to a different area and does not allow us to actually apply transformation to the copy. Also I thought of actually directly working on the pixels[] array but I was wondering if that would impact performance.
Does any one ever did that or has an idea how I could achieve that?
Thanks.
Answers
Your solution is the most performant I have tried so far. I tried a version that is reading/writing from pixels[] array but it was clearly slower. This is lightning fast! Thanks very much.
Coming back a few months later on this question because with the discovery of OpenCV for Processing I also found some quite performant functions to flip pixels around. So here is a simplified code that mirror the current screen four ways: