SetaPDF_Core_XObject_Image Class representing an Image XObject

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

Class hierarchy

Implements

Summary

Static Properties

$_xObjects

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

An array caching XObject objects


Properties

$_indirectObject

The indirect object of the XObject


Static Methods

create()

static public SetaPDF_Core_XObject_Image SetaPDF_Core_XObject_Image::create ( SetaPDF_Core_Document $document, SetaPDF_Core_Reader_ReaderInterface $reader )

Create an image xobject by a reader object.

Parameters
$document : SetaPDF_Core_Document
 
$reader : SetaPDF_Core_Reader_ReaderInterface
 

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 void SetaPDF_Core_XObject_Image::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
 

getBitsPerComponent()

public bool|int SetaPDF_Core_XObject_Image::getBitsPerComponent ( void )

Get the number of bits used to represen each colour component.

getColorSpace()

Get the color space of this image.

Parameters
$pdfValue : bool
 
Exceptions

Throws SetaPDF_Exception_NotImplemented

getHeight()

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

Get the height of the image.

Parameters
$width : float

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

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
 

getResourceType()

public string SetaPDF_Core_XObject::getResourceType ( void )

Get the resource type for external objects.

See

getWidth()

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

Get the width of the image.

Parameters
$height : float

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