Contents

screenCoordinates(physicalCoordinates:layer:)

Converts a point in physical coordinates inside a layer to its corresponding logical viewport coordinates.

Declaration

func screenCoordinates(physicalCoordinates: MTLCoordinate2D, layer layerIndex: Int) -> MTLCoordinate2D

Parameters

  • physicalCoordinates:

    A point in layer coordinates.

  • layerIndex:

    The index of the rate map to use.

Return Value

A point in the view coordinates corresponding to the source point.

Discussion

The returned coordinates are always greater than or equal to the input coordinates because the rasterization rate never exceeds 1:1 in any region.

See Also

Converting between viewport and physical coordinates