Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
Rectangle Class Reference

Class representing a rectangle. More...

Public Member Functions

 __construct ($ax, $ay, $bx, $by)
 Rectangle constructor.
 
 getHeight ()
 Get the height of the rectangle.
 
 getLlx ()
 Get the lower left abscissa.
 
 getLly ()
 Get the lower left ordinate.
 
 getUrx ()
 Get the upper right abscissa.
 
 getUry ()
 Get the upper right ordinate.
 
 getWidth ()
 Get the width of the rectangle.
 
 toArray ()
 Get the rectangle as an array.
 
 toPdfArray ()
 Get the rectangle as a PdfArray.
 

Static Public Member Functions

static byPdfArray ($array, PdfParser $parser)
 Create a rectangle instance by a PdfArray.
 
static byVectors (Vector $ll, Vector $ur)
 

Protected Attributes

int float $llx
 
int float $lly
 
int float $urx
 
int float $ury
 

Detailed Description

Class representing a rectangle.

Constructor & Destructor Documentation

◆ __construct()

Rectangle::__construct ( $ax,
$ay,
$bx,
$by )

Rectangle constructor.

Parameters
float | int$ax
float | int$ay
float | int$bx
float | int$by

Member Function Documentation

◆ byPdfArray()

static Rectangle::byPdfArray ( $array,
PdfParser $parser )
static

Create a rectangle instance by a PdfArray.

Parameters
PdfArray | mixed$array
PdfParser$parser
Return values
Rectangle
Exceptions
PdfTypeException
CrossReferenceException
PdfParserException

◆ getHeight()

Rectangle::getHeight ( )

Get the height of the rectangle.

Return values
float|int

◆ getLlx()

Rectangle::getLlx ( )

Get the lower left abscissa.

Return values
float|int

◆ getLly()

Rectangle::getLly ( )

Get the lower left ordinate.

Return values
float|int

◆ getUrx()

Rectangle::getUrx ( )

Get the upper right abscissa.

Return values
float|int

◆ getUry()

Rectangle::getUry ( )

Get the upper right ordinate.

Return values
float|int

◆ getWidth()

Rectangle::getWidth ( )

Get the width of the rectangle.

Return values
float|int

◆ toArray()

Rectangle::toArray ( )

Get the rectangle as an array.

Return values
array

◆ toPdfArray()

Rectangle::toPdfArray ( )

Get the rectangle as a PdfArray.

Return values
PdfArray

The documentation for this class was generated from the following file: