LavaUI docs GitHub

struct FrostRect

Swift

struct FrostRect

One rectangle to frost, in this surface's layout pixels. cornerRadius rounds the plate to match the popup sitting on it.

Sources/LavaUI/Overlay.swift:334

Constructors

init(x: Float, y: Float, w: Float, h: Float, cornerRadius: Float, refraction: Float = -1, frost: Float = 0, magnification: Float = 1)

Creates a rectangle to frost.

Sources/LavaUI/Overlay.swift:357

Properties

var cornerRadius: Float

Corner radius of the frosted plate, matching the popup on it.

Sources/LavaUI/Overlay.swift:344

var frost: Float

The grain of frosted glass on this plate, 0…1 — a view's .glassEffect(frost:).

Sources/LavaUI/Overlay.swift:351

var h: Float

Height, in pixels.

Sources/LavaUI/Overlay.swift:342

var magnification: Float

How much larger the desktop under this plate is drawn — a view's .glassEffect(magnification:). 1 is none.

Sources/LavaUI/Overlay.swift:354

var refraction: Float

How far this plate's rim bends, in pixels: a view's .glassEffect(refraction:), or 0 for plain frost. Negative takes the surface's own (LavaClient.setBackdropRefraction).

Sources/LavaUI/Overlay.swift:348

var w: Float

Width, in pixels.

Sources/LavaUI/Overlay.swift:340

var x: Float

Left edge, in the surface's layout pixels.

Sources/LavaUI/Overlay.swift:336

var y: Float

Top edge, in the surface's layout pixels.

Sources/LavaUI/Overlay.swift:338