KeyMorph class final

A rest → pressed key morph at one cell aspect, ready to paint.

Constructors

KeyMorph({required KeyGeometry rest, required KeyGeometry pressed, required double aspect, required FlatMorph flat})

Properties

aspect → double
Cell aspect (width / height) it was built for (quantised).
final
flat → FlatMorph
The flattened morph (unit square).
final
hashCode → int
The hash code for this object.
no setterinherited
pressed → KeyGeometry
Pressed outline.
final
rest → KeyGeometry
Resting outline.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pathFor(double t, Size size, Path path) → Path
Resets path to the outline at press t (0 rest, 1 pressed), scaled into size (the polygon's unit-square box maps onto the cell, so the shape fills it exactly).
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

applyTransform(Canvas canvas, Size size) → void
Applies the unit-square → cell transform for size to canvas (prefer this to pathFor: no allocation).