globalToLocal method
Converts the given point from global coordinates to local coordinates.
If out
is non-null, the resulting point will be stored in that object
and returned, otherwise a new GPoint object will be created and
returned.
Implementation
GPoint globalToLocal(GPoint globalPoint, [GPoint? out]) {
// Get the transformation matrix from the base object to this object.
getTransformationMatrix(base, _sHelperMatrixAlt);
// Invert the matrix to go from global coordinates to local coordinates.
_sHelperMatrixAlt.invert();
// Transform the point using the inverted matrix to get the local
// coordinates.
return _sHelperMatrixAlt.transformPoint(globalPoint, out);
}