CapsuleLayout class final

扭蛋机不可变几何;圆内位置相对球心,掉落折线为盒子坐标。

Inheritance
Annotations

Constructors

CapsuleLayout({required Size size, required Offset globeCenter, required double globeRadius, required double capsuleRadius, required List<int> capsules, required List<Offset> rest, required Rect body, required Offset knobCenter, required double knobRadius, required Offset exit, required List<Offset> dropPath, required Rect tray, required Rect card, required List<List<LuckyTextLine>> cardTexts})
创建布局;集合在构造时冻结,调用者不可修改。

Properties

body → Rect
机身区域。
final
capsuleRadius → double
胶囊半径。
final
capsules → List<int>
每个胶囊的奖品下标。
final
card → Rect
奖品卡区域。
final
cardCenter → Offset
预计算的卡片缩放中心,帧绘制不创建 Offset。
final
cardTexts → List<List<LuckyTextLine>>
各奖品卡预先测量的文字行。
final
dropLength → double
预计算的掉落总弧长。
final
dropPath → List<Offset>
掉落折线,包含首尾四点。
final
exit → Offset
球体出口。
final
globeCenter → Offset
球体圆心。
final
globeRadius → double
球体半径。
final
hashCode → int
The hash code for this object.
no setterinherited
isEmpty → bool
零尺寸布局没有可绘制内容。
no setteroverride
knobCenter → Offset
旋钮圆心。
final
knobRadius → double
旋钮半径。
final
lengths → List<double>
折线各段弧长。
final
paintsWhenEmpty → bool
布局为空时是否仍要绘制装饰(如 blocks 外框);默认不绘制。
no setterinherited
rest → List<Offset>
静止堆积的圆心相对坐标。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Size
布局盒子逻辑尺寸。
finalinherited
tray → Rect
托盘区域。
final

Methods

dropPosition(double progress) → Offset
按弧长返回掉落位置;progress 钳到零至一。
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