Contents

adornmentFrame(for:)

Returns the current frame of the specified adornment.

Declaration

@MainActor @preconcurrency func adornmentFrame(for adornmentID: UUID) -> CGRect?

Parameters

  • adornmentID:

    The ID of the MarkupAdornment whose frame you want to retrieve.

Return Value

The frame of the adornment in the coordinate system of this view controller’s view, or nil if the canvas does not display the adornment or cannot determine its frame.

Discussion

This method calculates the visual frame of an adornment based on its anchor position, image size, attachment point, zoom scale and content offset.

See Also

Managing adornments