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 [, $getValue = false ]
):

Create a rect object or array from a php array.

Parameters
$phpArray : array
 
$getValue
 
Exceptions

Throws InvalidArgumentException

byRectangle()

public static SetaPDF_Core_DataStructure_Rectangle::byRectangle (
$rectangle
):

Create an instance by another rectangle instance.

Parameters
$rectangle
 

create()

public static SetaPDF_Core_DataStructure_Rectangle::create (
$rectangle
):

Create a rectangle by a specific argument.

Parameters
$rectangle
 
Exceptions

Throws InvalidArgumentException


Methods

__construct()

The constructor.

Parameters
$array : SetaPDF_Core_Type_Array|null
 
Exceptions

Throws InvalidArgumentException

__clone()

Implementation of clone.

__get()

Get handler.

Parameters
$name
 
Exceptions

Throws InvalidArgumentException

__set()

public SetaPDF_Core_DataStructure_Rectangle::__set (
$name, $value
): void

Set handler.

Parameters
$name
 
$value
 
Exceptions

Throws InvalidArgumentException

Throws SetaPDF_Core_Type_Exception

contains()

Checks whether this rectangle contains another rectangle.

Parameters
$otherRect
 
Exceptions

Throws InvalidArgumentException

getHeight()

Get the height of the rect.

Exceptions

Throws SetaPDF_Core_Type_Exception

getLlx()

Get the lower left x-coordinate.

getLly()

Get the lower left y-coordinate.

getRectangle()

Return this rectangle as a SetaPDF_Core_Geometry_Rectangle instance.

getUrx()

Get the upper right x-coordinate.

getUry()

Get the upper right y-coordinate.

getWidth()

Get the width of the rect.

Exceptions

Throws SetaPDF_Core_Type_Exception

intersect()

Checks whether this rectangle intersects another rectangle.

Parameters
$otherRect
 
Exceptions

Throws InvalidArgumentException

setAll()

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

Set all coordinates.

Parameters
$llx

Lower left x value

$lly

Lower left y value

$urx

Upper right x value

$ury

Upper right y value

Exceptions

Throws SetaPDF_Core_Type_Exception

setLlx()

Set the lower left x-coordinate.

Parameters
$llx
 

setLly()

Set the lower left y-coordinate.

Parameters
$lly
 

setUrx()

Set the upper right x-coordinate.

Parameters
$urx
 

setUry()

Set the upper right y-coordinate.

Parameters
$ury
 

toPhp()

Get the data as a PHP value.