setasign\SetaPDF2\Core\XObject
Form Class representing a Form XObject
File: /SetaPDF v2/Core/XObject/Form.php
Old class name (alias):
\SetaPDF_Core_XObject_Form
Class hierarchy
Implements
- \setasign\SetaPDF2\Core\Canvas\ContainerInterface
- \setasign\SetaPDF2\Core\Resource\ResourceInterface
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
$_canvas
The canvas object for this form XObject
Static Methods
create()
Create an Form XObject.
Parameters
- $document : \SetaPDF_Core_Document
- $bbox : \SetaPDF_Core_DataStructure_Rectangle|array
freeCache()
get()
Get an external object by an indirect object/reference.
Parameters
- $xObjectReference : \SetaPDF_Core_Type_IndirectObjectInterface
- $subType : string
Exceptions
Methods
__construct()
draw()
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
getBBox()
Get the BBox value or rectangle.
Parameters
- $asRect : bool
Exceptions
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
getHeight()
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()
Get the indirect object of this XObject.
Parameters
- $document : ?\SetaPDF_Core_Document
getMatrix()
Get the form matrix.
Parameters
- $asArray : bool
Defines whether the matrix be returned as an array or as a matrix instance.
getWidth()
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()
Set the group attributes object.
Parameters
- $group : false|\SetaPDF_Core_TransparencyGroup
Exceptions
Throws \InvalidArgumentException
setMatrix()
Set the form matrix.
Parameters
- $matrix : int[]|\SetaPDF_Core_Geometry_Matrix
An array of six numbers or a matrix instance.