MorphGlassGlow class

The glow a finger raises on a pressed glass surface, in one frame.

UIKit lights a pressed tab bar with two glows of its flex interaction, both color matrices over what lies behind them rather than paint of their own: a wash across the whole surface that adds wash to every color channel, and a soft spot under the finger that multiplies the channels by factorAt - most at center, fading as a Gaussian of standard deviation radius. Both stay inside the surface's shape and under the control's content, and clamp at white: the spot is the color dodge whose white level is 1 - 1 / factorAt. A MorphGlassPainter renders them as part of the surface's glass or not at all; the package's renderer evaluates both in its liquid tier's final glass shader, and its flat tier draws no glow.

Annotations

Constructors

MorphGlassGlow({required double wash, required Offset center, required double radius, required double gain})
Creates a glow description.
const

Properties

center → Offset
The center of the spot, in the control's local coordinates.
final
gain → double
How much the spot brightens its center: there the channels are multiplied by 1 + gain.
final
hashCode → int
The hash code for this object.
no setteroverride
isVisible → bool
Whether the glow changes anything.
no setter
radius → double
The standard deviation of the spot's falloff, in pixels.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
wash → double
How much every color channel rises across the whole surface, in [0, 1] units.
final

Methods

factorAt(double distance) → double
The factor the spot multiplies the channels by at distance pixels from center.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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