Line stroke passing through points.
import { Line } from "pencil.js";
const options = {
stroke: "red",
strokeWidth: 9,
};
const line = new Line(from, [firstPoint, secondPoint, lastPoint], options);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 |
