MiuixVectorPath class

单条矢量路径的绘制描述。对应 Compose ImageVector 里的一个 path { ... } 节点。

style 为 PaintingStyle.fill(填充)或 PaintingStyle.stroke(描边); color 是矢量自带的原始颜色(SolidColor(...)),仅在未 tint时使用—— 使用 MiuixIcon 上色时会被 ColorFilter.tint 整体覆盖(见 MiuixVectorIconPainter)。 alpha 对应 fillAlpha / strokeAlpha;strokeWidth/strokeCap 对应描边参数。 groupTransform 对应包裹该路径的 group(scaleY = -1, translationY = ...) 等变换, 在视口坐标系下、绘制路径前施加(如 basic/Sidebar 的整体纵向翻转)。

Annotations

Constructors

MiuixVectorPath({required Path build(), PaintingStyle style = PaintingStyle.fill, Color color = const Color(0xFF000000), double alpha = 1.0, double strokeWidth = 0.0, StrokeCap strokeCap = StrokeCap.butt, Matrix4? groupTransform})
const

Properties

alpha → double
不透明度。对应 fillAlpha / strokeAlpha。
final
build → Path Function()
构造路径(视口坐标系)。用回调以便每次绘制得到新的 Path 实例,避免共享可变状态。
final
color → Color
矢量原始颜色(SolidColor)。仅在未 tint 时用于绘制。
final
groupTransform → Matrix4?
视口坐标系下的组变换(如纵向翻转)。为 null 表示无变换。
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strokeCap → StrokeCap
描边线帽。对应 strokeLineCap。
final
strokeWidth → double
描边宽度。对应 strokeLineWidth(0 表示 1px 发丝线)。
final
style → PaintingStyle
填充或描边。对应有无 fill / stroke。
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