setLineDash method

void setLineDash(
  1. JSArray<JSNumber> segments
)

The setLineDash() method of the Canvas 2D API's CanvasRenderingContext2D interface sets the line dash pattern used when stroking lines. It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.

Note: To return to using solid lines, set the line dash list to an empty array.

Implementation

external void setLineDash(JSArray<JSNumber> segments);