Rectangle
Table of Contents
Methods
- __construct() : mixed
- Rectangle constructor.
- getHeight() : int
- getWidth() : int
- getX() : int
- getY() : int
- resize() : bool
- Adjusts the rectangle to fit into the destination rectangle. Destination rectangle can also change.
- scale() : mixed
- setHeight() : Rectangle
- setWidth() : Rectangle
- setX() : Rectangle
- setY() : Rectangle
Methods
__construct()
Rectangle constructor.
public
__construct([int $width = 0 ][, int $height = 0 ][, int $x = 0 ][, int $y = 0 ]) : mixed
Parameters
- $width : int = 0
- $height : int = 0
- $x : int = 0
- $y : int = 0
getHeight()
public
getHeight() : int
Return values
intgetWidth()
public
getWidth() : int
Return values
intgetX()
public
getX() : int
Return values
intgetY()
public
getY() : int
Return values
intresize()
Adjusts the rectangle to fit into the destination rectangle. Destination rectangle can also change.
public
resize(Rectangle $destination, int $mode) : bool
Parameters
- $destination : Rectangle
- $mode : int
-
One of Image::RESIZE_* constants.
Return values
bool —True if resized.
scale()
public
scale(mixed $ratio) : mixed
Parameters
- $ratio : mixed
setHeight()
public
setHeight(int $height) : Rectangle
Parameters
- $height : int
Return values
RectanglesetWidth()
public
setWidth(int $width) : Rectangle
Parameters
- $width : int
Return values
RectanglesetX()
public
setX(int $x) : Rectangle
Parameters
- $x : int
Return values
RectanglesetY()
public
setY(int $y) : Rectangle
Parameters
- $y : int