Skip to content

NateScarlet/svg-variable-width-line

Repository files navigation

SVG Variable width line

npm package Build Status

Create svg path with each point can have variable width.

Can create line with PointerEvent.pressure.

Demo

import * as svgVariableWidthLine from 'svg-variable-width-line';

svgVariableWidthLine.compute({
  points: [{ x: 0, y: 0, w: 1 }, { x: 1, y: 0, w: 0 }],
});
// { d: '<Will be path `d` data>' }