const line = function line(opts) {
  const {
    context,
    px = d => d,
    x0,
    y0,
    x1,
    y1,
    fill,
    width = 1,
    alpha = 1
  } = opts;
  context.save();
  context.globalAlpha = alpha;
  context.beginPath();
  context.moveTo(x0, y0);
  context.lineTo(x1, y1);
  context.strokeStyle = fill;
  context.lineWidth = px(width);
  context.stroke();
  context.restore();
};
export default line;