SetaPDF_Core_DataStructure_Rectangle Data structure class for rect objects

File: /SetaPDF v2/Core/DataStructure/Rectangle.php

Class hierarchy

Implements

Summary

Properties

$_array

An array representing a rectangle [llx lly urx ury]


Static Methods

byArray()

public static SetaPDF_Core_DataStructure_Rectangle::byArray (
array $phpArray [, boolean $getValue = false ]
): SetaPDF_Core_Type_Array|SetaPDF_Core_DataStructure_Rectangle

Create a rect object or array from a php array.

Parameters
$phpArray : array
 
$getValue : boolean
 
Exceptions

Throws InvalidArgumentException


Methods

__construct()

The constructor.

Parameters
$array : SetaPDF_Core_Type_Array
 
Exceptions

Throws InvalidArgumentException

__clone()

Implementation of clone.

__get()

public SetaPDF_Core_DataStructure_Rectangle::__get (
string $name
): float|integer

Get handler.

Parameters
$name : string
 
Exceptions

Throws InvalidArgumentException

__set()

public SetaPDF_Core_DataStructure_Rectangle::__set (
string $name, float|integer $value
): void

Set handler.

Parameters
$name : string
 
$value : float|integer
 
Exceptions

Throws InvalidArgumentException

Throws SetaPDF_Core_Type_Exception

contains()

Checks whether this rectangle contains another rectangle.

Parameters
$otherRect : SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle
 
Exceptions

Throws InvalidArgumentException

getHeight()

public SetaPDF_Core_DataStructure_Rectangle::getHeight (
void
): integer|float

Get the height of the rect.

Exceptions

Throws SetaPDF_Core_Type_Exception

getLlx()

public SetaPDF_Core_DataStructure_Rectangle::getLlx (
void
): integer|float

Get the lower left x-coordinate.

getLly()

public SetaPDF_Core_DataStructure_Rectangle::getLly (
void
): integer|float

Get the lower left y-coordinate.

getRectangle()

getUrx()

public SetaPDF_Core_DataStructure_Rectangle::getUrx (
void
): integer|float

Get the upper right x-coordinate.

getUry()

public SetaPDF_Core_DataStructure_Rectangle::getUry (
void
): integer|float

Get the upper right y-coordinate.

getWidth()

public SetaPDF_Core_DataStructure_Rectangle::getWidth (
void
): integer|float

Get the width of the rect.

Exceptions

Throws SetaPDF_Core_Type_Exception

intersect()

Checks whether this rectangle intersects another rectangle.

Parameters
$otherRect : SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle
 
Exceptions

Throws InvalidArgumentException

setAll()

public SetaPDF_Core_DataStructure_Rectangle::setAll (
float|integer $llx, float|integer $lly, float|integer $urx, float|integer $ury
): void

Set all coordinates.

Parameters
$llx : float|integer

Lower left x value

$lly : float|integer

Lower left y value

$urx : float|integer

Upper right x value

$ury : float|integer

Upper right y value

Exceptions

Throws SetaPDF_Core_Type_Exception

setLlx()

public SetaPDF_Core_DataStructure_Rectangle::setLlx (
integer|float $llx
): void

Set the lower left x-coordinate.

Parameters
$llx : integer|float
 

setLly()

public SetaPDF_Core_DataStructure_Rectangle::setLly (
integer|float $lly
): void

Set the lower left y-coordinate.

Parameters
$lly : integer|float
 

setUrx()

public SetaPDF_Core_DataStructure_Rectangle::setUrx (
integer|float $urx
): void

Set the upper right x-coordinate.

Parameters
$urx : integer|float
 

setUry()

public SetaPDF_Core_DataStructure_Rectangle::setUry (
integer|float $ury
): void

Set the upper right y-coordinate.

Parameters
$ury : integer|float
 

toPhp()

Get the data as a PHP value.