SimpleSoftwareIO\QrCode\ImageMerge::setProperties PHP Method

setProperties() protected method

Sets the objects properties.
protected setProperties ( $percentage )
$percentage float The percentage that the merge image should take up.
    protected function setProperties($percentage)
    {
        if ($percentage > 1) {
            throw new \InvalidArgumentException('$percentage must be less than 1');
        }
        $this->sourceImageHeight = $this->sourceImage->getHeight();
        $this->sourceImageWidth = $this->sourceImage->getWidth();
        $this->mergeImageHeight = $this->mergeImage->getHeight();
        $this->mergeImageWidth = $this->mergeImage->getWidth();
        $this->calculateOverlap($percentage);
        $this->calculateCenter();
    }