OverlayPlacement

class OverlayPlacement(val size: Size, val overlayAnchor: Anchor, val frameAnchor: Anchor)(source)

Where a composited overlay lands, in real pixels of the frame it is drawn on.

Both backends place an overlay by naming a point inside the overlay and a point inside the frame, then bringing the two together. That pair is resolved here, once for every lowering, so the same overlay lands in the same relative spot on either platform and at any resolution, the way retainedRect is shared.

Constructors

Link copied to clipboard
constructor(size: Size, overlayAnchor: Anchor, frameAnchor: Anchor)

Properties

Link copied to clipboard

The point inside the frame the overlay is brought to, as a fraction of the frame.

Link copied to clipboard

The point inside the overlay that meets frameAnchor, as a fraction of the overlay.

Link copied to clipboard
val size: Size

The overlay's drawn size, in pixels of the frame it lands on.

Functions

Link copied to clipboard

Where this placement puts the overlay on frame, as a fraction of it.