//Quadratic Curve

window.quadCurve = function(opts) {
  //Variables
  this.opts = opts || {};
  this.startx = opts.startx;
  this.starty = opts.starty;
  this.xparam = opts.xparam;
  this.yparam = opts.yparam;
  this.wparam = opts.wparam;
  this.hparam = opts.hparam;
  this.strokeStyle = opts.strokeStyle;
  
  //Drawing
  ctx.beginPath();
  ctx.moveTo(this.startx, this.starty);
  ctx.quadraticCurveTo(this.xparam, this.yparam, this.wparam, this.hparam);
  ctx.strokeStyle = this.strokeStyle;
  ctx.stroke();
  
  //Error Handling
  if(!this.opts) {
    console.log(err);
  }
  else if(!this.startx) {
    console.log(err);
  }
  else if(!this.starty) {
    console.log(err);
  }
  else if(!this.xparam) {
    console.log(err);
  }
  else if(!this.yparam) {
    console.log(err);
  }
  else if(!this.wparam) {
    console.log(err);
  }
  else if(!this.hparam) {
    console.log(err);
  }
  else if(!this.strokeStyle) {
    console.log(err);
  }
};
