GlassSurfaceRecord class Cost and policy

One glass surface, read at the moment it was asked.

The rect is the axis-aligned bounding box the surface occupies, mapped up through every transform between it and the root — so a panel inside a scaled or scrolled subtree reports where it actually is, and a rotated one reports its bounding box, which is larger than the glass. The rotation case is named rather than handled: no measurement covers it.

Produced by GlassSurfaceGeometry.readGeometry and read through GlassLedger.surfaces; an application reads these rather than builds them.

See also:

Annotations

Constructors

GlassSurfaceRecord({required Rect rect, required double shapeArea, GlassTier tier = GlassTier.full, Rect? travel, GlassFinish? finish, double presence = 1, double materialize = 1})
A surface at rect covering shapeArea, as its render object reports it.
const

Properties

captureRect → Rect
What the host captures for this surface: rect, or the declared region grown to include it.
no setter
finish → GlassFinish?
The finish this surface is drawn in — its own, or its blend group's — or null for "the host's". What the capture blurs its slot by.
final
hashCode → int
The hash code for this object.
no setterinherited
materialize → double
How far the surface has materialized (RenderGlassSurface.materialize). At zero it draws nothing and is captured for nothing, like presence.
final
presence → double
How much of the surface is there (RenderGlassSurface.presence). At zero it draws nothing, and the host captures nothing for it — so a drop that exists only while a control is held costs the atlas nothing, and its finish nothing, the rest of the time.
final
rect → Rect
Where the surface is, in global logical pixels.
final
rectArea → double
The rect's own area, which is the denominator every measured constant here was fitted against.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shapeArea → double
What the shape covers inside rect, in logical px² — the rect minus what the four corners cut away. See GlassLedger.cornerCutCoefficient.
final
tier → GlassTier
Which rung of the ladder this surface draws.
final
travel → Rect?
The region the surface declared it may move within (GlassTravel), in the same space, or null for a surface that declared none.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited