Transforms a rectangle in content coordinates to viewport coordinates, accounting for layout offset.
public static Rect TransformContentToViewport(Rect contentRect, Point layoutOffset, Matrix matrix)
A rectangle in content coordinates (where 0,0 is the top-left of the content).
The layout offset where Avalonia positioned the element within its parent.
The transform matrix.