The 'stroke-miterlimit' property

Background

The 'stroke-miterlimit' property allows one to limit the extent miter line-joins extend when the angle between the incoming and outgoing path is small. Due to limits in the rendering libraries at the time SVG 1.1 was created which were in turn limited by hardware requirement, when the length of a miter line-join exceeded the 'stroke-miterlimit', the join was drawn using a bevel line-join.

There are several consequences of this behavior:

  1. An abrupt transition occurs when the length of a miter line-join in an animated path crosses the miter limit.
  2. There is a visual disconnect between line joins in the same path with some miter lengths are below and others are above the miter limit.

Amelia Bellamy-Royds has proposed a different behavior: if the length of miter line-join is greater than the miter limit then the miter is clipped to that limit. This can be illustrated in the following figures:

A path consisting of two joined lines
					   where the angle between the lines
					   is animated.

Behavior of a miter line-join as described by SVG1.1.

A path consisting of two joined lines
					   where the angle between the lines
					   is animated

Behavior of a miter line-join as proposed.

Discussion

While the proposed behavior is an improvement, in most cases, over the old behavior, there are several problems with the proposal:

  1. A new value type would be needed to insure existing content is not broken.
  2. Graphic rendering engines would need to include the new value type. The calculations for the new behavior are trivial but it still needs getting the renderer authors aboard (the same problem is faced by the 'arcs' value).