imagefilledrectangle

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Draw a filled rectangle
<?php imagefilledrectangle(    GdImage $image,    int $x1,    int $y1,    int $x2,    int $y2,    int $color): bool
<?php         } else {


            imagefilledrectangle($resource, 0, 0, $width - 1, $height - 1, $filling);

        }



        isset($tile) ? imagedestroy($tile->getCore()) : null;
<?php         $transparent = imagecolorallocatealpha($canvas->getCore(), 255, 255, 255, 127);

        imagealphablending($canvas->getCore(), false); // do not blend / just overwrite

        imagefilledrectangle($canvas->getCore(), $dst_x, $dst_y, $dst_x + $src_w - 1, $dst_y + $src_h - 1, $transparent);




        imagecopy($canvas->getCore(), $image->getCore(), $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);
<?php         imagealphablending($canvas, false);

        $transparent = imagecolorallocatealpha($canvas, 255, 255, 255, 127);

        imagefilledrectangle($canvas, 0, 0, $width, $height, $transparent);

        imagecolortransparent($canvas, $transparent);

        imagealphablending($canvas, true);
<?php     public function applyToImage(Image $image, $x = 0, $y = 0)

    {

        $background = new Color($this->background);

        imagefilledrectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $background->getInt());



        if ($this->hasBorder()) {

            $border_color = new Color($this->border_color);