예제 #1
0
 public function draw(&$canvas, $color = 657930, $exceptions = [])
 {
     $color = is_null($this->color) ? $color : $this->color;
     $half = $this->width / 2;
     for ($pixelX = $this->center->x - $half; $pixelX <= $this->center->x + $half; $pixelX++) {
         imagesetpixel($canvas, $pixelX, $this->center->y, $color);
     }
     if (!is_null($this->childTarget)) {
         $this->childTarget->draw($canvas);
     }
 }