"mapToGlobal"
The property allows to convert the panel relative coordinates into global coordinates.
Synopsis
shape.mapToGlobal(int x, int y, int&gx, int &gy);
Parameter
Parameter | Description |
---|---|
x | x panel coordinate |
y | y panel coordinate |
gx | x global coordinate |
gy | y global coordinate |
Description
The function expects unzoomed panel coordinates and x, y, which are relative to the upper left corner of the shapes bounding box. The result is gx, gy, which are desktop-global coordinates. They can be used e.g. in setCursorPosition(x, y, true);
In this context, non-scaled panel coordinates means that the current zoom factor of the panel is not applied, i.e. the coordinates are the same regardless of the zoom factor.
Assignment
All Shapes