This function translates screen coordinates (x
, y
) to coordinates relative to the actor.
For example, it can be used to translate screen events from global screen coordinates into actor-local coordinates.
The conversion can fail, notably if the transform stack results in the actor being projected on the screen as a mere line.
The conversion should not be expected to be pixel-perfect due to the nature of the operation. In general the error grows when the skewing of the actor rectangle on screen increases.
This function can be computationally intensive.
This function only works when the allocation is up-to-date, i.e. inside of the paint implementation
this |
A Actor |
x |
x screen coordinate of the point to unproject |
y |
y screen coordinate of the point to unproject |
x_out |
return location for the unprojected x coordinance |
y_out |
return location for the unprojected y coordinance |
|