setasign\SetaPDF2\Core\XObject
Image Class representing an Image XObject
File: /SetaPDF v2/Core/XObject/Image.php
Old class name (alias):
\SetaPDF_Core_XObject_Image
Class hierarchy
Implements
Summary
Constants
TYPE_COLOR_SPACE
public const string \setasign\SetaPDF2\Core\Resource\ResourceInterface::TYPE_COLOR_SPACE = 'ColorSpace'
Type constant
TYPE_EXT_G_STATE
public const string \setasign\SetaPDF2\Core\Resource\ResourceInterface::TYPE_EXT_G_STATE = 'ExtGState'
Type constant
TYPE_FONT
Type constant
TYPE_PATTERN
Type constant
TYPE_PROC_SET
Type constant
TYPE_PROPERTIES
public const string \setasign\SetaPDF2\Core\Resource\ResourceInterface::TYPE_PROPERTIES = 'Properties'
Type constant
TYPE_SHADING
Type constant
TYPE_X_OBJECT
Type constant
Properties
Static Methods
create()
Create an image xobject by a reader object.
Parameters
- $document : \SetaPDF_Core_Document
- $reader : \SetaPDF_Core_Reader_ReaderInterface
freeCache()
get()
Get an external object by an indirect object/reference.
Parameters
- $xObjectReference : \SetaPDF_Core_Type_IndirectObjectInterface
- $subType : string
Exceptions
Methods
__construct()
draw()
public Image::draw (
\SetaPDF_Core_Canvas $canvas,
float $x = 0.0,
float $y = 0.0,
float $width = null,
float $height = null
): voidfloat $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
getColorSpace()
public Image::getColorSpace (
bool $pdfValue = false
): \SetaPDF_Core_ColorSpace|\SetaPDF_Core_ColorSpace_DeviceCmyk|\SetaPDF_Core_ColorSpace_DeviceGray|\SetaPDF_Core_ColorSpace_DeviceRgb|\SetaPDF_Core_ColorSpace_IccBased|\SetaPDF_Core_ColorSpace_Separation|\SetaPDF_Core_Type_AbstractType|falseGet the color space of this image.
Parameters
- $pdfValue : bool
Exceptions
getIndirectObject()
public XObject::getIndirectObject (
?\SetaPDF_Core_Document $document = null
): \SetaPDF_Core_Type_IndirectObjectGet the indirect object of this XObject.
Parameters
- $document : ?\SetaPDF_Core_Document