Stroke class

A finished stroke. thickness is in image-space (already divided by the camera scale at submission time) so the rendered viewport width stays constant across zoom levels.

Constructors

Stroke({required List<StrokePoint> points, required BrushType brushType, required Color color, required double thickness, bool isArrow = false})
A stroke through points.

Properties

arrowAnchor ↔ Offset?
The arrowhead's tip; absent until an arrow stroke ends.
getter/setter pair
arrowDirection ↔ double?
Angle in radians from the tip back along the stroke, which the arms open around; absent until an arrow stroke ends.
getter/setter pair
arrowProgress ↔ double
How much of the arrowhead is drawn, 0 to 1.
getter/setter pair
brushType → BrushType
The brush that drew it.
final
color → Color
The stroke's colour.
final
hashCode → int
The hash code for this object.
no setterinherited
isArrow → bool
Whether the stroke ends in an arrowhead.
final
points → List<StrokePoint>
The samples, in drag order.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tailFactor ↔ double
Multiplier applied to the width of the tail (last N smooth points). 1.0 = fully committed (no thinning). 0.7 = freshly drawn, telegram's activeWidthFactor. The drying animator interpolates 0.7 → 1.0 over 400 ms after the stroke ends.
getter/setter pair
thickness → double
The chosen thickness, in image pixels.
final

Methods

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.
inherited