/** * @param ImageInterface $image */ public function __construct(ImageInterface $image) { $this->image = $image->getImage(); // init max limit $imgSize = $image->getSize(); $this->xMax = $imgSize['width']; $this->yMax = $imgSize['height']; }
/** * @param ImageInterface $image * @param string $randSeed */ public function __construct(ImageInterface $image, $randSeed) { $this->image = $image->getImage(); $this->randSeed = $randSeed; $this->imgSize = $image->getSize(); $this->setMaxLimit(); $this->setCoordinates(); // init rand $this->initRand(); }