Bitrix API

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
int

getWidth()

public getWidth() : int
Return values
int

getX()

public getX() : int
Return values
int

getY()

public getY() : int
Return values
int

resize()

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

        
On this page

Search results