How to set offset to top left of IMAGE, instead of center of image
So I'm stuck with a small puzzle; Recently, I've decided to upgrade my test suites to SikuliX, from an older version of Sikuli from 4 years ago. The old click(x, y) method would find the image, and click x units right, and click y units down from the TOP LEFT of the image, where it is represented by (0, 0) coordinate. In SikuliX, offsetX and offsetY seem to be calculated with the SCREEN dimensions in mind. To avoid having to change every Click() in my test suites, I just want to change the customized click function I made, by converting the offSet calculations from relative to the screen, to relative to the image found.
Here's an example of what I'm trying to do:
#If pattern returns NO MATCH, return 0
print("Did not find " + png)
# Find returns a match object
m = find(Pattern(
# v1 = ???? Some calculation to use relative image x
# v2 = ???? Some calculation to use relative image y
# Clicks with an @offsetX, and NEGATIVE offsetY, because we are using relative position to
# x = 0, y = 0. Normally, it is returned as middle of the image
I'm just posting here before I start experimenting with numbers, I figured someone has had to have run into this before. I will close this if I find the solution myself, thanks!