figureone
    Preparing search index...

    Function polyline

    • Creates triangles to the width of a polyline.

      A polyline is defined by a series of points.

      The polyline can either be converted directly to triangles that create its width (num undefined), or split into num equal segments first.

      simple polylines are rectangles formed between two points in a polyline or segmented polyline. When there are bends in the line, gaps will form on the outside border. These gaps will become more visible as the line gets thicker.

      When simple = false, each corner has an additional two triangles to fill in the gaps.

      The final number of vertices depends on simple, num and close. Each line segment as 6 vertices. Each corner fill has 6 vertices. If num is undefined or null then the total number of line segments will be points.length + 1.

      This method is useful for morphing between lines, but is of limited use. If the line segments gradient change quadrants, then the line thicknesses will change during morphing. Especially for thick lines, it will often be better to use polylineToShapes.

      Parameters

      Returns number[]