HexLayout class
六边形布局计算工具
Constructors
- HexLayout({required HexOrientationMatrix orientation, required double size, Offset origin = Offset.zero})
-
const
- HexLayout.flat({required double size, Offset origin = Offset.zero})
-
创建平顶朝上的布局
factory
- HexLayout.pointy({required double size, Offset origin = Offset.zero})
-
创建尖顶朝上的布局
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hexHeight → double
-
获取六边形的高度
no setter
- hexWidth → double
-
获取六边形的宽度
no setter
- orientation → HexOrientationMatrix
-
final
- origin → Offset
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double
-
final
Methods
-
hexCorners(
HexCoordinate hex) → List< Offset> - 获取六边形的所有顶点坐标
-
hexToPixel(
HexCoordinate hex) → Offset - 将六边形坐标转换为像素坐标(中心点)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pixelToHex(
Offset point) → HexCoordinate - 将像素坐标转换为六边形坐标
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited