SetaPDF_Core_XObject_Form Class representing a Form XObject

File: /SetaPDF v2/Core/XObject/Form.php

Class hierarchy

Implements

Summary

Constants

TYPE_COLOR_SPACE

public const string SetaPDF_Core_Resource::TYPE_COLOR_SPACE = 'ColorSpace'

Type constant

TYPE_EXT_G_STATE

public const string SetaPDF_Core_Resource::TYPE_EXT_G_STATE = 'ExtGState'

Type constant

TYPE_FONT

public const string SetaPDF_Core_Resource::TYPE_FONT = 'Font'

Type constant

TYPE_PATTERN

public const string SetaPDF_Core_Resource::TYPE_PATTERN = 'Pattern'

Type constant

TYPE_PROC_SET

public const string SetaPDF_Core_Resource::TYPE_PROC_SET = 'ProcSet'

Type constant

TYPE_PROPERTIES

public const string SetaPDF_Core_Resource::TYPE_PROPERTIES = 'Properties'

Type constant

TYPE_SHADING

public const string SetaPDF_Core_Resource::TYPE_SHADING = 'Shading'

Type constant

TYPE_X_OBJECT

public const string SetaPDF_Core_Resource::TYPE_X_OBJECT = 'XObject'

Type constant


Properties

$_bbox

The BBox rectangle

$_canvas

The canvas object for this form XObject

$_indirectObject

The indirect object of the XObject


Static Methods

create()

public static SetaPDF_Core_XObject_Form::create (
SetaPDF_Core_Document $document, $bbox
):

Create an Form XObject.

Parameters
$document : SetaPDF_Core_Document
 
$bbox
 

freeCache()

public static SetaPDF_Core_XObject::freeCache (): void

Release XObject instances by a document instance.

Parameters
$document : SetaPDF_Core_Document
 

get()

public static SetaPDF_Core_XObject::get (
SetaPDF_Core_Type_IndirectObjectInterface $xObjectReference [, $subType = null ]
):

Get an external object by an indirect object/reference.

Parameters
$xObjectReference : SetaPDF_Core_Type_IndirectObjectInterface
 
$subType
 
Exceptions

Throws SetaPDF_Exception_NotImplemented


Methods

__construct()

The constructor.

Parameters
$indirectObject : SetaPDF_Core_Type_IndirectObjectInterface
 

_getBBox()

protected SetaPDF_Core_XObject_Form::_getBBox (
void
):

Get the bounding box after applying the transformation matrix.

cleanUp()

public SetaPDF_Core_XObject::cleanUp (
void
): void

Release memory and cycled references.

draw()

public SetaPDF_Core_XObject_Form::draw (
SetaPDF_Core_Canvas $canvas [, $x = 0.0 [, $y = 0.0 [, $width = null [, $height = null ]]]]
):

Draw the external object on the canvas.

Parameters
$canvas : SetaPDF_Core_Canvas
 
$x
 
$y
 
$width
 
$height
 

ensureDefaultKeys()

Ensures the default keys.

getBBox()

public SetaPDF_Core_XObject_Form::getBBox (
[ $asRect = true ]
):

Get the BBox value or rectangle.

Parameters
$asRect
 
Exceptions

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Core_Type_IndirectReference_Exception

getCanvas()

Get the canvas for this form XObject.

getGroup()

Get a group attributes object.

getHeight()

public SetaPDF_Core_XObject_Form::getHeight (
[ $width = null ]
):

Get the height of the XObject.

Parameters
$width

To get the height in relation to a width value keeping the aspect ratio

See

getIndirectObject()

public SetaPDF_Core_XObject::getIndirectObject (
[ SetaPDF_Core_Document|null $document = null ]
):

Get the indirect object of this XObject.

Parameters
$document : SetaPDF_Core_Document|null
 

getMatrix()

public SetaPDF_Core_XObject_Form::getMatrix (
[ $asArray = false ]
):

Get the form matrix.

Parameters
$asArray

Defines whether the matrix be returned as an array or as a matrix instance.

getObject()

public SetaPDF_Core_XObject_Form::getObject (
[ $observe = false ]
):

Get the indirect object of this XObject.

Parameters
$observe
 

getResourceType()

Get the resource type for external objects.

See

getStreamProxy()

Get the stream proxy.

getWidth()

public SetaPDF_Core_XObject_Form::getWidth (
[ $height = null ]
):

Get the width of the XObject.

Parameters
$height

To get the width in relation to a height value keeping the aspect ratio

See

setGroup()

public SetaPDF_Core_XObject_Form::setGroup (
$group
): void

Set the group attributes object.

Parameters
$group
 
Exceptions

Throws InvalidArgumentException

setMatrix()

public SetaPDF_Core_XObject_Form::setMatrix (
$matrix
): void

Set the form matrix.

Parameters
$matrix

An array of six numbers or a matrix instance.