LineStyle class

线段样式

Constructors

LineStyle({Color color = Colors.black, double width = 1, StrokeCap cap = StrokeCap.butt, StrokeJoin join = StrokeJoin.miter, List<double> dash = const [], BoxShadow? shadow, Shader? shader, bool smooth = false, Align2 align = Align2.center})
const

Properties

align → Align2
因为Flutter绘制直线时是平分的, 因此为了优化视觉效果,提供了一个对齐方式
final
cap → StrokeCap
final
color → Color
final
dash → List<double>
final
hashCode → int
The hash code for this object.
no setterinherited
join → StrokeJoin
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shader → Shader?
final
shadow → BoxShadow?
final
smooth → bool
final
width → double
final

Methods

drawArc(Canvas canvas, Paint paint, double radius, num startAngle, num sweepAngle, {Offset center = Offset.zero}) → void
绘制一个圆弧部分(也可以绘制圆)
drawPath(Canvas canvas, Paint paint, Path path, {bool drawDash = false, double? maxWidth, double? colorOP}) → void
drawPolygon(Canvas canvas, Paint paint, List<Offset> points, {bool close = false, bool refillPaint = true, double? maxWidth}) → void
fillPaint(Paint paint, {Rect? rect, double? maxStrokeWidth, double? colorOP}) → void
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