Cheetah
PixelCommand.php
Go to the documentation of this file.
1 <?php
2 
4 
5 use \Intervention\Image\Gd\Color;
6 
8 {
15  public function execute($image)
16  {
17  $color = $this->argument(0)->required()->value();
18  $color = new Color($color);
19  $x = $this->argument(1)->type('digit')->required()->value();
20  $y = $this->argument(2)->type('digit')->required()->value();
21 
22  return imagesetpixel($image->getCore(), $x, $y, $color->getInt());
23  }
24 }
Intervention\Image\Gd\Commands\PixelCommand\execute
execute($image)
Definition: PixelCommand.php:15
Intervention\Image\Gd\Commands
Definition: BackupCommand.php:3
Intervention\Image\Gd\Commands\PixelCommand
Definition: PixelCommand.php:8
php
Intervention\Image\Commands\AbstractCommand\argument
argument($key)
Definition: AbstractCommand.php:45
Intervention\Image\Commands\AbstractCommand
Definition: AbstractCommand.php:6
Intervention\Image\Gd\Color
Definition: Color.php:8