TransformContentToViewport(Rect, Point, Matrix) Method

Definition

Assembly PanAndZoom.dll

Transforms a rectangle in content coordinates to viewport coordinates, accounting for layout offset.

public static Rect TransformContentToViewport(Rect contentRect, Point layoutOffset, Matrix matrix)

Parameters

contentRect
Avalonia.Rect

A rectangle in content coordinates (where 0,0 is the top-left of the content).

layoutOffset
Avalonia.Point

The layout offset where Avalonia positioned the element within its parent.

matrix
Avalonia.Matrix

The transform matrix.

Returns

Avalonia.Rect
The rectangle in viewport coordinates.