Grafika\Gd\DrawingObject\CubicBezier::draw PHP Méthode

draw() public méthode

public draw ( Grafika\ImageInterface $image ) : Image
$image Grafika\ImageInterface
Résultat Grafika\Gd\Image
    public function draw($image)
    {
        // Localize vars
        $width = $image->getWidth();
        $height = $image->getHeight();
        $gd = $image->getCore();
        list($x0, $y0) = $this->point1;
        list($x1, $y1) = $this->control1;
        list($x2, $y2) = $this->control2;
        list($x3, $y3) = $this->point2;
        $this->plot($gd, $x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3);
        $type = $image->getType();
        $file = $image->getImageFile();
        return new Image($gd, $file, $width, $height, $type);
        // Create new image with updated core
    }