In javascript , how to reverse y axis of canvas?
问题 I have data from 2d image in a 1D array, plot is perfect but I would like to reverse y axis. I saw tips with ctx.transform but it doesn't seems to work on this example: https://jsfiddle.net/92j9r2j4/2/ Z array just for example, Z[n*n-1] is used to mark the corner. 回答1: ctx.putImageData is not affected by transform. The image data functions getImageData and putImageData are not affected by the current transform. They are memory blit (move) functions not graphical functions. You have several