/** * @param resource $resource * @param int $width * @param int $height */ private function __construct($resource, $width, $height) { $this->resource = $resource; $this->width = $width; $this->height = $height; $this->lastCoords = new Coords(0, 0); $this->backgroundColor = Color::createWhite(); }