The XYMatrix example is a great start for using matrixes and we use this principle a lot. But sometimes you would like to flip a matrix horizontally or vertically.
Does anybody has some spare code laying around to achieve this? Best would be without duplicate arrays but a straight honest and simple function. Maybe somebody already modified the XY function for this purpose?
As I understand you want to transpose a matrix (x,y), I’m afraid it is hard to do it in place (without creating second matrix) when x!=y. It should be possible to do it using dynamic allocation, however there would be a lot of data coping not sure if it is worth it. But I could be missing some ideas
The aim is to do it dynamically and no second matrix since there is simply no memory for this. And then have a variable just like serpentine. Something like flipvertical, fliphorizontal. @Leon_Yuhanov no excel
@Jonas_Vorwerk So dynamic flips are pretty easy, you only need 1 array to hold either the VER or HOR stripe of pixels. you then swap the with a for loop. Rotation is harder…not sure of a simple algorithmic approach