A question about Example Advanced / XojoScript / Imaging

Do you see the parameter here called pixels(,)?
Where in the application is this passed to these methods?

Private Function DuplicateImage(pixels(,) as color) as color(,) ... End Function

The function DuplicateImage is called in the first line of the Rotate subroutine in the XojoScript. “Pixels” is passed to DuplicateImage from the parameter in the Rotate subroutine, which in turn gets it from the getPixels method of the context class for the XojoScript (ScriptContext). I think that the point is to create a local array for the XojoScript so that the compiler can better optimize the machine code for processing the image (without doing external calls to the mPixels array in the main application). Hope that helps.