public function draw($image)
{
// Localize vars
$width = $image->getWidth();
$height = $image->getHeight();
$gd = $image->getCore();
list($x0, $y0) = $this->point1;
list($x1, $y1) = $this->control;
list($x2, $y2) = $this->point2;
$this->plot($gd, $x0, $y0, $x1, $y1, $x2, $y2);
$type = $image->getType();
$file = $image->getImageFile();
return new Image($gd, $file, $width, $height, $type);
// Create new image with updated core
}