SetaPDF_Core_DataStructure_Rectangle Data structure class for rect objects
File: /SetaPDF v2/Core/DataStructure/Rectangle.php
Class hierarchy
Implements
Summary
Properties
Static Methods
byArray()
public static SetaPDF_Core_DataStructure_Rectangle::byArray (
array $phpArray [, boolean $getValue = false ]
): SetaPDF_Core_Type_Array|SetaPDF_Core_DataStructure_RectangleCreate a rect object or array from a php array.
Parameters
- $phpArray : array
- $getValue : boolean
Exceptions
Throws InvalidArgumentException
byRectangle()
public static SetaPDF_Core_DataStructure_Rectangle::byRectangle (): SetaPDF_Core_DataStructure_Rectangle
Create an instance by another rectangle instance.
Parameters
create()
public static SetaPDF_Core_DataStructure_Rectangle::create (
array|SetaPDF_Core_Geometry_Rectangle|SetaPDF_Core_DataStructure_Rectangle $rectangle
): SetaPDF_Core_DataStructure_RectangleCreate 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
__get()
__set()
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
Exceptions
Throws InvalidArgumentException
getHeight()
getRectangle()
Return this rectangle as a SetaPDF_Core_Geometry_Rectangle
instance.
getWidth()
intersect()
Checks whether this rectangle intersects another rectangle.
Parameters
Exceptions
Throws InvalidArgumentException
setAll()
public SetaPDF_Core_DataStructure_Rectangle::setAll (
float|integer $llx, float|integer $lly, float|integer $urx, float|integer $ury
): voidSet 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