# localToGlobal method

- Offset point,
- {RenderObject? ancestor}

Convert the given point from the local coordinate system for this box to the global coordinate system in logical pixels.

If `ancestor`

is non-null, this function converts the given point to the
coordinate system of `ancestor`

(which must be an ancestor of this render
object) instead of to the global coordinate system.

This method is implemented in terms of getTransformTo. If the transform
matrix puts the given `point`

on the line at infinity (for instance, when
the transform matrix is the zero matrix), this method returns (NaN, NaN).

## Implementation

```
Offset localToGlobal(Offset point, { RenderObject? ancestor }) {
return MatrixUtils.transformPoint(getTransformTo(ancestor), point);
}
```