protected function drawImage(awPoint $point) { if ($this->image instanceof awImage) { $width = $this->image->width; $height = $this->image->height; list($x, $y) = $point->getLocation(); $x1 = (int) ($x - $width / 2); $x2 = $x1 + $width; $y1 = (int) ($y - $width / 2); $y2 = $y1 + $height; $this->border->rectangle($this->drawer, new awPoint($x1 - 1, $y1 - 1), new awPoint($x2 + 1, $y2 + 1)); $this->drawer->copyImage($this->image, new awPoint($x1, $y1), new awPoint($x2, $y2)); } }