If you want it to be left
units from the left and top
units from the top, then try the origin as:
x:
left
y:window.frame.size.height - rectangle.frame.size.height - top
Ben Alpert
2009-06-20 23:03:10
If you want it to be left
units from the left and top
units from the top, then try the origin as:
x:
left
y:window.frame.size.height - rectangle.frame.size.height - top
For posterity: I really have no idea how Apple (or anyone else) does this - and honestly, I think the application I'm trying to interact with was not written with this in mind anyways, since it is far from accessible. To solve the problem, I just ended up sampling a whole bunch of different (x,y) pairs and constructing a linear model to predict the right coordinates for arbitrary coordinates. A little bit of a sledgehammer, but it's the best I could come up with.