RedeyeVentures\GeoPattern\GeoPattern::geoSquares PHP Method

geoSquares() protected method

protected geoSquares ( )
    protected function geoSquares()
    {
        $squareSize = $this->map($this->hexVal(0, 1), 0, 15, 10, 60);
        $this->svg->setWidth($squareSize * 6)->setHeight($squareSize * 6);
        $i = 0;
        for ($y = 0; $y <= 5; $y++) {
            for ($x = 0; $x <= 5; $x++) {
                $val = $this->hexVal($i, 1);
                $opacity = $this->opacity($val);
                $fill = $this->fillColor($val);
                $this->svg->addRectangle($x * $squareSize, $y * $squareSize, $squareSize, $squareSize, ['fill' => $fill, 'fill-opacity' => $opacity, 'stroke' => self::STROKE_COLOR, 'stroke-opacity' => self::STROKE_OPACITY]);
                $i++;
            }
        }
    }