getStageBounds method
Returns the bounds of the Stage object in the coordinate system
specified by the targetSpace
object.
If the out
parameter is provided, the result is stored in that object.
Otherwise, a new GRect object is created and returned.
If the targetSpace
parameter is null or unspecified, the bounds are
returned in the global coordinate system.
The targetSpace
object can be any GDisplayObject, including the
Stage object itself.
Implementation
GRect getStageBounds(GDisplayObject targetSpace, [GRect? out]) {
out ??= GRect();
out.setTo(0, 0, stageWidth, stageHeight);
getTransformationMatrix(targetSpace, _sMatrix);
return out.getBounds(_sMatrix, out);
}