Area
class \
Table of Contents
Properties
Methods
- __construct() : mixed
- __toString() : string
- applyRatioRestriction() : Area
- asArray() : array
- createEmpty() : Area
- createFromConfiguration() : Area
- createMultipleFromConfiguration() : Area[]
- getHeight() : float
- getOffsetLeft() : float
- getOffsetTop() : float
- getWidth() : float
- isEmpty() : bool
- makeAbsoluteBasedOnDimension() : self
- Same as makeAbsoluteBasedOnFile(), for a source whose dimensions are already known rather than read from a FileInterface's cached width/height properties - for example a system resource outside the File Abstraction Layer, which has no such properties to read.
- makeAbsoluteBasedOnFile() : Area
- makeRelativeBasedOnDimension() : self
- Same as makeRelativeBasedOnFile(), for a source whose dimensions are already known rather than read from a FileInterface's cached width/height properties - for example a system resource outside the File Abstraction Layer, which has no such properties to read.
- makeRelativeBasedOnFile() : Area
Properties
$height
protected
float
$height
$width
protected
float
$width
$x
protected
float
$x
$y
protected
float
$y
Methods
__construct()
public
__construct(float $x, float $y, float $width, float $height) : mixed
Parameters
- $x : float
- $y : float
- $width : float
- $height : float
__toString()
public
__toString() : string
Return values
stringapplyRatioRestriction()
public
applyRatioRestriction(Ratio $ratio) : Area
Parameters
- $ratio : Ratio
Return values
AreaasArray()
public
asArray() : array
Internal
Return values
arraycreateEmpty()
public
static createEmpty() : Area
Return values
AreacreateFromConfiguration()
public
static createFromConfiguration(array $config) : Area
Parameters
- $config : array
Tags
Return values
AreacreateMultipleFromConfiguration()
public
static createMultipleFromConfiguration(array $config) : Area[]
Parameters
- $config : array
Tags
Return values
Area[]getHeight()
public
getHeight() : float
Return values
floatgetOffsetLeft()
public
getOffsetLeft() : float
Return values
floatgetOffsetTop()
public
getOffsetTop() : float
Return values
floatgetWidth()
public
getWidth() : float
Return values
floatisEmpty()
public
isEmpty() : bool
Return values
boolmakeAbsoluteBasedOnDimension()
Same as makeAbsoluteBasedOnFile(), for a source whose dimensions are already known rather than read from a FileInterface's cached width/height properties - for example a system resource outside the File Abstraction Layer, which has no such properties to read.
public
makeAbsoluteBasedOnDimension(ImageDimension $dimension) : self
Parameters
- $dimension : ImageDimension
Return values
selfmakeAbsoluteBasedOnFile()
public
makeAbsoluteBasedOnFile(FileInterface $file) : Area
Parameters
- $file : FileInterface
Return values
AreamakeRelativeBasedOnDimension()
Same as makeRelativeBasedOnFile(), for a source whose dimensions are already known rather than read from a FileInterface's cached width/height properties - for example a system resource outside the File Abstraction Layer, which has no such properties to read.
public
makeRelativeBasedOnDimension(ImageDimension $dimension) : self
Parameters
- $dimension : ImageDimension
Return values
selfmakeRelativeBasedOnFile()
public
makeRelativeBasedOnFile(FileInterface $file) : Area
Parameters
- $file : FileInterface