setasign\SetaPDF2\Core\XObject

XObject Abstract class representing an external object

File: /SetaPDF v2/Core/XObject/XObject.php
Old class name (alias): \SetaPDF_Core_XObject

Class hierarchy

Implements

Summary

Constants

TYPE_COLOR_SPACE

Type constant

TYPE_EXT_G_STATE

Type constant

TYPE_FONT

Type constant

TYPE_PATTERN

Type constant

TYPE_PROC_SET

Type constant

TYPE_PROPERTIES

Type constant

TYPE_SHADING

Type constant

TYPE_X_OBJECT

Type constant


Properties

$_indirectObject

The indirect object of the XObject


Static Methods

freeCache()

public static XObject::freeCache (): void

Release XObject instances by a document instance.

Parameters
$document : \SetaPDF_Core_Document
 

get()

Get an external object by an indirect object/reference.

Parameters
$xObjectReference : \SetaPDF_Core_Type_IndirectObjectInterface
 
$subType : string
 
Exceptions

Throws \setasign\SetaPDF2\NotImplementedException


Methods

__construct()

The constructor.

Parameters
$indirectObject : \SetaPDF_Core_Type_IndirectObjectInterface
 

cleanUp()

public XObject::cleanUp (
void
): void

Release memory and cycled references.

draw()

abstract public XObject::draw (
\SetaPDF_Core_Canvas $canvas,
int $x = 0,
int $y = 0,
?float $width = null,
?float $height = null
): mixed

Draw the external object on the canvas.

Parameters
$canvas : \SetaPDF_Core_Canvas
 
$x : int
 
$y : int
 
$width : ?float
 
$height : ?float
 

getIndirectObject()

Get the indirect object of this XObject.

Parameters
$document : ?\SetaPDF_Core_Document
 

getResourceType()

public XObject::getResourceType (
void
): string

Get the resource type for external objects.

See