code: function drawStroke (stroke) {
              context.beginPath();
              for (var j = 0; j < stroke.points.length - 1; j++) {
                  var start = normalizePoint(stroke.points[j]);
                  var end = normalizePoint(stroke.points[j + 1]);
  
                  context.moveTo(start.x, start.y);
                  context.lineTo(end.x, end.y);
              }
              context.closePath();
  
              context.strokeStyle = stroke.color;
              context.lineWidth = normalizeLineSize(stroke.size);
              context.lineJoin = stroke.join;
              context.lineCap = stroke.cap;
              context.miterLimit = stroke.miterLimit;
  
              context.stroke();
          }
docs: Draw a stroke on the canvas