strokeMiterLimit property

double get strokeMiterLimit

The limit for miters to be drawn on segments when the join is set to StrokeJoin.miter and the style is set to PaintingStyle.stroke. If this limit is exceeded, then a StrokeJoin.bevel join will be drawn instead. This may cause some 'popping' of the corners of a path if the angle between line segments is animated, as seen in the diagrams below.

This limit is expressed as a limit on the length of the miter.

Defaults to 4.0. Using zero as a limit will cause a StrokeJoin.bevel join to be used all the time.

The centers of the line segments are colored in the diagrams above to highlight the joins, but in normal usage the join is the same color as the line.

See also:

  • strokeJoin to control the kind of finish to place on the joins between segments.
  • strokeCap to control what is drawn at the ends of the stroke.

Implementation

double get strokeMiterLimit {
  return _data.getFloat32(_kStrokeMiterLimitOffset, _kFakeHostEndian);
}
set strokeMiterLimit (double value)

Implementation

set strokeMiterLimit(double value) {
  final double encoded = value - _kStrokeMiterLimitDefault;
  _data.setFloat32(_kStrokeMiterLimitOffset, encoded, _kFakeHostEndian);
}