setasign\SetaPDF2\Core\DataStructure
Rectangle Data structure class for rect objects
File: /SetaPDF v2/Core/DataStructure/Rectangle.php
Old class name (alias):
\SetaPDF_Core_DataStructure_Rectangle
Class hierarchy
Implements
Summary
Properties
Static Methods
byArray()
public static Rectangle::byArray (
array $phpArray,
bool $getValue = false
): \setasign\SetaPDF2\Core\Type\PdfArray|Rectanglebool $getValue = false
Create a rect object or array from a php array.
Parameters
- $phpArray: array
- $getValue: bool
Exceptions
Throws \InvalidArgumentException
byRectangle()
Create an instance by another rectangle instance.
Parameters
- $rectangle: \setasign\SetaPDF2\Core\Geometry\Rectangle|Rectangle
create()
public static Rectangle::create (
array|\setasign\SetaPDF2\Core\Geometry\Rectangle|Rectangle $rectangle
): RectangleCreate a rectangle by a specific argument.
Parameters
- $rectangle: array|\setasign\SetaPDF2\Core\Geometry\Rectangle|Rectangle
Exceptions
Throws \InvalidArgumentException
Methods
__construct()
__get()
__set()
contains()
Checks whether this rectangle contains another rectangle.
Parameters
- $otherRect: \setasign\SetaPDF2\Core\Geometry\Rectangle|Rectangle
Exceptions
Throws \InvalidArgumentException
getRectangle()
Return this rectangle as a \setasign\SetaPDF2\Core\Geometry\Rectangle instance.
intersect()
Checks whether this rectangle intersects another rectangle.
Parameters
- $otherRect: \setasign\SetaPDF2\Core\Geometry\Rectangle|Rectangle
Exceptions
Throws \InvalidArgumentException
setAll()
Set all coordinates.
Parameters
- $llx: float|int
Lower left x value
- $lly: float|int
Lower left y value
- $urx: float|int
Upper right x value
- $ury: float|int
Upper right y value
