drawImage/drawImageEx coordinates mismatch
-
It seems like drawImage() and drawImageEx() use difference reference points when drawing the image. drawImage() uses top left of the image, while drawImageEx() uses the center of the image as the reference point.
I can't find any reference in the documentation that this should be different.
img = loadImage("FUZE/brick01") toggle = true fpscounter = 0 x = 100 y = 200 loop clear() fpscounter += 1 if fps counter % 60 == 0 then toggle = !toggle endif if toggle then print("drawImage") drawImage(img, x, y) else print("drawImageEx") drawImageEx(img, {x,y}, 0, {1,1}, white, {0,0}) endif update() repeat
-
This is a documentation issue, and the reason for this being this way is because of the angle parameter, where you would normally want the image to rotate about the centre of the image.
There is an issue for this internally and it'll be updated in the help in the near future!