getScreenRect method
- GemMapController object
Gets the screen rectangle occupied by this object in the map view, or null if not available.
Parameters
- IN object The GemMapController instance for the map view.
Returns
- The screen rectangle as RectType<int>, or null if not available.
Implementation
Rectangle<int>? getScreenRect(final GemMapController object) {
final OperationResult resultString = objectMethod(
_pointerId,
'MapSceneObject',
'getScreenRect',
args: object.pointerId,
);
final int gemApiError = resultString['gemApiError'];
if (gemApiError != 0) {
return null;
}
final Rectangle<int> rect = Rectangle<int>(
resultString['result']['x'] ?? 0,
resultString['result']['y'] ?? 0,
resultString['result']['width'] ?? 0,
resultString['result']['height'] ?? 0);
return rect;
}