SetaPDF_Core_DataStructure_Rectangle Data structure class for rect objects

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

Class hierarchy

Implements

Summary

Properties

$_array

An array representing a rectangle [llx lly urx ury]


Static Methods

byArray()

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

Create a rect object or array from a php array.

Parameters
$phpArray : array
 
$getValue : boolean
 
Exceptions

Throws InvalidArgumentException

byRectangle()

static public SetaPDF_Core_DataStructure_Rectangle SetaPDF_Core_DataStructure_Rectangle::byRectangle ( SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle $rectangle )

Create an instance by another rectangle instance.

Parameters
$rectangle : SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle
 

create()

static public SetaPDF_Core_DataStructure_Rectangle SetaPDF_Core_DataStructure_Rectangle::create ( array|SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle $rectangle )

Create a rectangle by a specific argument.

Parameters
$rectangle : array|SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle
 
Exceptions

Throws InvalidArgumentException


Methods

__construct()

public SetaPDF_Core_DataStructure_Rectangle::__construct ( [ SetaPDF_Core_Type_Array $array = null ] )

The constructor.

Parameters
$array : SetaPDF_Core_Type_Array
 
Exceptions

Throws InvalidArgumentException

__clone()

public void SetaPDF_Core_DataStructure_Rectangle::__clone ( void )

Implementation of clone.

__get()

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

Get handler.

Parameters
$name : string
 
Exceptions

Throws InvalidArgumentException

__set()

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

Set handler.

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

Throws InvalidArgumentException

contains()

public boolean SetaPDF_Core_DataStructure_Rectangle::contains ( SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle $otherRect )

Checks whether this rectangle contains another rectangle.

Parameters
$otherRect : SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle
 
Exceptions

Throws InvalidArgumentException

getHeight()

public integer|float SetaPDF_Core_DataStructure_Rectangle::getHeight ( void )

Get the height of the rect.

getLlx()

public integer|float SetaPDF_Core_DataStructure_Rectangle::getLlx ( void )

Get the lower left x-coordinate.

getLly()

public integer|float SetaPDF_Core_DataStructure_Rectangle::getLly ( void )

Get the lower left y-coordinate.

getRectangle()

public SetaPDF_Core_Geometry_Rectangle SetaPDF_Core_DataStructure_Rectangle::getRectangle ( void )

Return this rectangle as SetaPDF_Core_Geometry_Rectangle.

getUrx()

public integer|float SetaPDF_Core_DataStructure_Rectangle::getUrx ( void )

Get the upper right x-coordinate.

getUry()

public integer|float SetaPDF_Core_DataStructure_Rectangle::getUry ( void )

Get the upper right y-coordinate.

getValue()

public SetaPDF_Core_Type_Array SetaPDF_Core_DataStructure_Rectangle::getValue ( void )

Get the PDF value object.

See

getWidth()

public integer|float SetaPDF_Core_DataStructure_Rectangle::getWidth ( void )

Get the width of the rect.

intersect()

public boolean SetaPDF_Core_DataStructure_Rectangle::intersect ( SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle $otherRect )

Checks whether this rectangle intersects another rectangle.

Parameters
$otherRect : SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle
 
Exceptions

Throws InvalidArgumentException

setAll()

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

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

setLlx()

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

Set the lower left x-coordinate.

Parameters
$llx : integer|float
 

setLly()

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

Set the lower left y-coordinate.

Parameters
$lly : integer|float
 

setUrx()

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

Set the upper right x-coordinate.

Parameters
$urx : integer|float
 

setUry()

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

Set the upper right y-coordinate.

Parameters
$ury : integer|float
 

toPhp()

public array SetaPDF_Core_DataStructure_Rectangle::toPhp ( void )

Get the data as a PHP value.