SetaPDF_Core_XObject_Form Class representing a Form XObject

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

Class hierarchy

Implements

Summary

Static Properties

$_xObjects

static protected array SetaPDF_Core_XObject_Form::$_xObjects = array()

An array caching XObject objects


Properties

$_bbox

The BBox rectangle

$_canvas

The canvas object for this form XObject

$_indirectObject

The indirect object of the XObject


Static Methods

create()

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

Create an Form XObject.

Parameters
$document : SetaPDF_Core_Document
 
$bbox : SetaPDF_Core_DataStructure_Rectangle|array
 

freeCache()

static public void SetaPDF_Core_XObject::freeCache ( SetaPDF_Core_Document $document )

Release XObject instances by a document instance.

Parameters
$document : SetaPDF_Core_Document
 

get()

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

Get an external object by an indirect object/reference.

Parameters
$xObjectReference : SetaPDF_Core_Type_IndirectObjectInterface
 
$subType : string
 
Exceptions

Throws SetaPDF_Exception_NotImplemented


Methods

__construct()

public SetaPDF_Core_XObject::__construct ( SetaPDF_Core_Type_IndirectObjectInterface $indirectObject )

The constructor.

Parameters
$indirectObject : SetaPDF_Core_Type_IndirectObjectInterface
 

cleanUp()

public void SetaPDF_Core_XObject::cleanUp ( void )

Release memory and cycled references.

draw()

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

Draw the external object on the canvas.

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

ensureDefaultKeys()

public void SetaPDF_Core_XObject_Form::ensureDefaultKeys ( void )

Ensures the default keys.

getBBox()

public SetaPDF_Core_DataStructure_Rectangle|SetaPDF_Core_Type_Array SetaPDF_Core_XObject_Form::getBBox ( [ boolean $asRect = true ] )

Get the BBox value or rectangle.

Parameters
$asRect : boolean
 

getCanvas()

public SetaPDF_Core_Canvas SetaPDF_Core_XObject_Form::getCanvas ( void )

Get the canvas for this form XObject.

getGroup()

public null|SetaPDF_Core_TransparencyGroup SetaPDF_Core_XObject_Form::getGroup ( void )

Get a group attributes object.

getHeight()

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

Get the height of the XObject.

Parameters
$width : float

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

See

getIndirectObject()

public SetaPDF_Core_Type_IndirectObject 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 boolean|SetaPDF_Core_Geometry_Matrix|array SetaPDF_Core_XObject_Form::getMatrix ( [ boolean $asArray = false ] )

Get the form matrix.

Parameters
$asArray : boolean

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

getObject()

public SetaPDF_Core_Type_IndirectObject SetaPDF_Core_XObject_Form::getObject ( void )

Get the indirect object of this XObject.

getResourceType()

public string SetaPDF_Core_XObject::getResourceType ( void )

Get the resource type for external objects.

See

getStreamProxy()

public SetaPDF_Core_Canvas_StreamProxyInterface SetaPDF_Core_XObject_Form::getStreamProxy ( void )

Get the stream proxy.

getWidth()

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

Get the width of the XObject.

Parameters
$height : float

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

See

setGroup()

public void SetaPDF_Core_XObject_Form::setGroup ( false|SetaPDF_Core_TransparencyGroup $group )

Set the group attributes object.

Parameters
$group : false|SetaPDF_Core_TransparencyGroup
 
Exceptions

Throws InvalidArgumentException

setMatrix()

public void SetaPDF_Core_XObject_Form::setMatrix ( int[]|SetaPDF_Core_Geometry_Matrix $matrix )

Set the form matrix.

Parameters
$matrix : int[]|SetaPDF_Core_Geometry_Matrix

An array of six numbers or a matrix instance.