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

$_array

An array representing a rectangle [llx lly urx ury]


Static Methods

byArray()

public static Rectangle::byArray (
array $phpArray,
bool $getValue = false
): \SetaPDF_Core_Type_Array|\SetaPDF_Core_DataStructure_Rectangle

Create a rect object or array from a php array.

Parameters
$phpArray : array
 
$getValue : bool
 
Exceptions

Throws \InvalidArgumentException

create()


Methods

__construct()

The constructor.

Parameters
$array : ?\SetaPDF_Core_Type_Array
 
Exceptions

Throws \InvalidArgumentException

__clone()

public Rectangle::__clone (
void
): void

Implementation of clone.

__get()

public Rectangle::__get (
string $name
): float|int

Get handler.

Parameters
$name : string
 
Exceptions

Throws \InvalidArgumentException

__set()

public Rectangle::__set (
string $name,
float|int $value
): void

Set handler.

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

Throws \InvalidArgumentException

Throws \setasign\SetaPDF2\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 Rectangle::getHeight (
void
): int|float

Get the height of the rect.

Exceptions

Throws \setasign\SetaPDF2\Core\Type\Exception

getLlx()

public Rectangle::getLlx (
void
): int|float

Get the lower left x-coordinate.

getLly()

public Rectangle::getLly (
void
): int|float

Get the lower left y-coordinate.

getRectangle()

getUrx()

public Rectangle::getUrx (
void
): int|float

Get the upper right x-coordinate.

getUry()

public Rectangle::getUry (
void
): int|float

Get the upper right y-coordinate.

getValue()

getWidth()

public Rectangle::getWidth (
void
): int|float

Get the width of the rect.

Exceptions

Throws \setasign\SetaPDF2\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 Rectangle::setAll (
float|int $llx,
float|int $lly,
float|int $urx,
float|int $ury
): void

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

Exceptions

Throws \setasign\SetaPDF2\Core\Type\Exception

setLlx()

public Rectangle::setLlx (
int|float $llx
): void

Set the lower left x-coordinate.

Parameters
$llx : int|float
 

setLly()

public Rectangle::setLly (
int|float $lly
): void

Set the lower left y-coordinate.

Parameters
$lly : int|float
 

setUrx()

public Rectangle::setUrx (
int|float $urx
): void

Set the upper right x-coordinate.

Parameters
$urx : int|float
 

setUry()

public Rectangle::setUry (
int|float $ury
): void

Set the upper right y-coordinate.

Parameters
$ury : int|float
 

toPhp()

public Rectangle::toPhp (
void
): array

Get the data as a PHP value.