Set the aspect ratio.
By setting these,
only images with this aspect ratio can be uploaded.
@param int $x
@param int $y
@return ImageUploadValidator
421528
public function setAllowAspectRatio($x, $y)
    {
        $this->allowAspectRatioX = (int)$x;
        $this->allowAspectRatioY = (int)$y;

        return $this;
    }
340931
public function forceContainerSize($x, $y)
    {
        $this->force = true;
        $this->_X = $x;
        $this->_Y = $y;
    }
594753
public function setExtension($sExtension = null)
    {
        if (null === $sExtension) {
            return $this;
        }

        if (!in_array($sExtension, $this->aValidExtensions)) {
            $message = sprintf(
                'The extension "%s" is not a valid one, extension image for Gravatar can be: %s',
                $sExtension,
                implode(', ', $this->aValidExtensions)
            );

            throw new InvalidImageExtensionException($message);
        }

        $this->sExtension = $sExtension;

        return $this;
    }
190880
public function getPixel($x, $y)
    {
        $result = '';
        $rgb = $this->getRGB($x, $y);

        foreach ($rgb as $value) {
            $result .= substr(decbin($value), -1, 1);
        }

        return $result;
    }
313373
public function setPosition($x, $y, $name = 'current')
    {
        if (null === $name) {
            $name = 'current';
        }

        $this->browser->request('POST', 'window/'.urlencode($name).'/position', json_encode(array('x' => $x, 'y' => $y)));

        return $this;
    }
469823
public function applyToImage(Image $image, $x = 0, $y = 0)
    {
        $rectangle = new \ImagickDraw;

        // set background
        $bgcolor = new Color($this->background);
        $rectangle->setFillColor($bgcolor->getPixel());

        // set border
        if ($this->hasBorder()) {
            $border_color = new Color($this->border_color);
            $rectangle->setStrokeWidth($this->border_width);
            $rectangle->setStrokeColor($border_color->getPixel());
        }

        $rectangle->rectangle($this->x1, $this->y1, $this->x2, $this->y2);

        $image->getCore()->drawImage($rectangle);

        return true;
    }
396527
public function applyToImage(Image $image, $x = 0, $y = 0)
    {
        $background = new Color($this->background);
        imagefilledrectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $background->getInt());

        if ($this->hasBorder()) {
            $border_color = new Color($this->border_color);
            imagesetthickness($image->getCore(), $this->border_width);
            imagerectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $border_color->getInt());
        }

        return true;
    }
1349142
public function goToXY($x, $y)
    {
        if ($this->x < $x) {
            while ($this->x < $x) {
                echo self::RIGHT_KEYPRESS;
                $this->x++;
            }
        }

        if ($this->x > $x) {
            while ($this->x > $x) {
                echo self::LEFT_KEYPRESS;
                $this->x--;
            }
        }

        if ($this->y > $y) {
            while ($this->y > $y) {
                echo self::UP_KEYPRESS;
                $this->y--;
            }
        }

        if ($this->y < $y) {
            while ($this->y < $y) {
                echo self::DOWN_KEYPRESS;
                $this->y++;
            }
        }
    }
876035
public function is_out_of_bounds($x, $y)
    {
        return (
            $x < 0 ||
            $y < 0 ||
            $x > ($this->width - 1) ||
            $y > ($this->height - 1)
        );
    }
685346
public function drawRectangleMarker($X, $Y, array $Format = [])
    {
        $Size = isset($Format["Size"]) ? $Format["Size"] : 4;

        $HalfSize = floor($Size / 2);
        $this->drawFilledRectangle($X - $HalfSize, $Y - $HalfSize, $X + $HalfSize, $Y + $HalfSize, $Format);
    }
759448
public function crop($x, $y, $width, $height)
    {
        $oCanvas = imagecreatetruecolor($width, $height);
        imagecopyresampled($oCanvas, $this->oImg, 0, 0, $x, $y, $width, $height, $width, $height);
        $this->oImg = $oCanvas;
        return $this;
    }
729927
public static function create($x, $y)
	{
		$point = new Point();
		$point->x = $x;
		$point->y = $y;
		return $point;
	}
57504
function setDimensions($x, $y)
    {
        $this->max_x = $x - 1;
        $this->max_y = $y - 1;
        $this->x = $this->y = 0;
        $this->history = $this->history_attrs = array();
        $this->attr_row = array_fill(0, $this->max_x + 2, $this->base_attr_cell);
        $this->screen = array_fill(0, $this->max_y + 1, '');
        $this->attrs = array_fill(0, $this->max_y + 1, $this->attr_row);
        $this->ansi = '';
    }
1051409
public function moveTo($x, $y) 
    {
        $p = $this->transform->multiplyPoint($x, $y);
        $this->paths[] = array($p->x, $p->y);
    }
992137
public function manualCrop(int $width, int $height, int $x, int $y)
    {
        if ($width < 0) {
            throw InvalidManipulation::invalidWidth($width);
        }

        if ($height < 0) {
            throw InvalidManipulation::invalidWidth($height);
        }

        return $this->addManipulation('manualCrop', "{$width},{$height},{$x},{$y}");
    }
838605
public function isValidBound($x, $y) {
        list($r, $g, $b) = $this->shapeImage->getRGB($x, $y);
        return $r < 240 || $g < 240 || $b < 240;
    }
835282
protected function getCol($image, $x, $y, $background)
    {
        $L = imagesx($image);
        $H = imagesy($image);
        if ($x < 0 || $x >= $L || $y < 0 || $y >= $H) {
            return $background;
        }

        return imagecolorat($image, $x, $y);
    }