UNPKG

opentype.js

Version:
12 lines (9 loc) 256 B
// Drawing utility functions. // Draw a line on the given context from point `x1,y1` to point `x2,y2`. function line(ctx, x1, y1, x2, y2) { ctx.beginPath(); ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); ctx.stroke(); } export default { line };