Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.34 KB

readme.md

File metadata and controls

30 lines (21 loc) · 1.34 KB

Line

Line stroke passing through points.

Line example

Examples

import { Line } from "pencil.js";

const options = {
    stroke: "red",
    strokeWidth: 9,
};
const line = new Line(from, [firstPoint, secondPoint, lastPoint], options);

LineOptions

Inherit from ComponentOptions.

Name Type Default Comment
cap String Line.caps.round How the line end points looks
join String Line.joins.round How the line segment are join
fill Color or String null Color used to fill, set to null for transparent
stroke Color or String Component.defaultOptions.fill Color used to stroke, set to null for transparent
absolute Boolean false Should points be treated as absolute coordinates