eZPublish(LegacyStack)  5.1
eZImageObject Class Reference

Image object which handles image layers. More...

+ Inheritance diagram for eZImageObject:
+ Collaboration diagram for eZImageObject:

Public Member Functions

 appendLayer (&$imageLayer, $parameters=array())
 
 calculateAxisPlacement ($value, $type, $alignment, $axisStart, $axisStop, $currentLength)
 
 calculatePosition ($parameters, $width, $height)
 
 destroy ()
 
 eZImageObject ($imageObjectRef=null, $imageObject=null, $width=false, $height=false)
 
 flatten ()
 
 getTransparency ($parameters)
 
 getTransparencyPercent ($parameters)
 
 hasLayer ($layerID)
 
 initializeAxis ($parameters, $name)
 
 prependLayer (&$imageLayer, $parameters=array())
 
 processImage ()
 
 removeLayer ($layerID)
 
 setTemplateURI ($uri)
 
 templateData ()
 
- Public Member Functions inherited from eZImageInterface
 __clone ()
 
 allocateColor ($name, $red, $green, $blue)
 
 alternativeText ()
 
 attribute ($name)
 
 attributes ()
 
 blendImage ($destinationImageObject, $imageObject, $destinationX, $destinationY, $sourceWidth, $sourceHeight, $sourceX=0, $sourceY=0)
 
 clear ($color=false)
 
 cloneImage ($imageObject, $width, $height, $useTruecolor=null)
 
 color ($name)
 
 copyImage ($destinationImageObject, $imageObject, $destinationX, $destinationY, $sourceWidth, $sourceHeight, $sourceX=0, $sourceY=0)
 
 create ($width, $height, $useTruecolor=null)
 
 destroy ()
 
 drawText (&$font, $textColor, $text, $x, $y, $angle, $imageObject=null)
 
 eZImageInterface ($imageObjectRef=null, $imageObject=null, $width=false, $height=false)
 
 font ()
 
 hasAttribute ($name)
 
hasSize ()
 
 height ()
 
 imageObject ($createMissing=true)
 
imagePath ()
 
 isProcessed ()
 
 isTruecolor ()
 
 load ()
 
 loadGIF ($storedPath, $storedFile)
 
 loadJPEG ($storedPath, $storedFile)
 
 loadPNG ($storedPath, $storedFile)
 
 merge ($imageObject, $x, $y, $width, $height)
 
 mergeImage ($destinationImageObject, $imageObject, $destinationX, $destinationY, $sourceWidth, $sourceHeight, $sourceX=0, $sourceY=0, $transparency=0)
 
 process ()
 
 processImage ()
 
 setAlternativeText ($text)
 
 setFont ($font)
 
 setHeight ($h)
 
 setStoredFile ($file, $path, $type)
 
 setTextColor ($textColor)
 
 setWidth ($w)
 
 store ($fileName, $filePath, $type)
 
 textColor ()
 
 width ()
 

Public Attributes

 $ImageLayerIndex
 
 $ImageLayers
 
 $TemplateURI
 
const ALIGN_AXIS_NONE = 0x00
 Alignment values. More...
 
const ALIGN_AXIS_START = 0x01
 
const ALIGN_AXIS_STOP = 0x02
 
const ALIGN_AXIS_CENTER = 0x03
 
const ALIGN_AXIS_MASK = 0x03
 
const PLACE_CONSTANT = 1
 Placement types Places the layer absolutely from on the axis. More...
 
const PLACE_RELATIVE = 2
 Places the layer relative to the axis size. More...
 
- Public Attributes inherited from eZImageInterface
 $AlternativeText
 
 $Font
 
 $Height
 
 $ImageObject
 
 $ImageObjectRef
 
 $IsProcessed
 
 $IsTrueColor
 
 $Palette
 
 $PaletteIndex
 
 $StoredFile
 
 $StoredPath
 
 $StoredType
 
 $Width
 

Additional Inherited Members

- Static Public Member Functions inherited from eZImageInterface
static cleanupRegisteredImages ()
 
static hasGD2 ()
 
static unregisterImage ($imageRef)
 
- Protected Member Functions inherited from eZImageInterface
 imageObjectInternal ($createMissing=true)
 
- Static Protected Member Functions inherited from eZImageInterface
static registerImage ($image)
 

Detailed Description

Image object which handles image layers.

Member Function Documentation

eZImageObject::appendLayer ( $imageLayer,
  $parameters = array() 
)

Adds the image layer object $imageLayer to the end of the layer list with optional parameters $parameters

Returns
the ID of the layer, the ID is unique per image object.
See Also
prependLayer
eZImageObject::calculateAxisPlacement (   $value,
  $type,
  $alignment,
  $axisStart,
  $axisStop,
  $currentLength 
)

Figures out the absolute axis placement and returns it. The variable $type determines how $value is used, it can either be a constant value (self::PLACE_CONSTANT) or a relative value (self::PLACE_RELATIVE) where input value is placed relative to the length of the axis ($axisStop - $axisStart). $alignment determines where the axis should start, self::ALIGN_AXIS_NONE and self::ALIGN_AXIS_START will return the position from $axisStart towards $axisStop, self::ALIGN_AXIS_STOP returns the position from the $axisStop towards $axisStart while self::ALIGN_AXIS_CENTER returns the middle of $axisStart and $axisStop.

Referenced by calculatePosition().

eZImageObject::calculatePosition (   $parameters,
  $width,
  $height 
)

Calculates the position for x and y parameters in $parameters and returns an absolute position in an array. The returned array will contain the x and y key.

eZImageObject::destroy ( )

Cleans up the current image object if it is set.

eZImageObject::eZImageObject (   $imageObjectRef = null,
  $imageObject = null,
  $width = false,
  $height = false 
)
eZImageObject::flatten ( )

Goes trough all layers and merges them together into a single image. This image can then be displayed on the webpage.

Referenced by processImage().

eZImageObject::getTransparency (   $parameters)
Returns
the transparency value found in the parameters or 0 if no value is found.

Referenced by getTransparencyPercent().

eZImageObject::getTransparencyPercent (   $parameters)
Returns
the transparency percentage found in the parameters or 0 if no percentage is found.
eZImageObject::hasLayer (   $layerID)
Returns
true if the layer with ID $layerID exists in this image object.
eZImageObject::initializeAxis (   $parameters,
  $name 
)

Initializes the axis from the parameter value $name filling in any missing values with defaults.

Referenced by calculatePosition().

eZImageObject::prependLayer ( $imageLayer,
  $parameters = array() 
)

Adds the image layer object $imageLayer to the beginning of the layer list with optional parameters $parameters

Returns
the ID of the layer, the ID is unique per image object.
See Also
appendLayer
eZImageObject::processImage ( )

Flattens the image so that it can be displayed.

eZImageObject::removeLayer (   $layerID)

Removes the layer with ID $layerID.

Returns
true if succesful
See Also
hasLayer, appendLayer
eZImageObject::setTemplateURI (   $uri)

Sets the URI of the template to use for displaying it using the template engine to $uri.

eZImageObject::templateData ( )

A definition which tells the template engine which template to use for displaying the image.

Member Data Documentation

eZImageObject::$ImageLayerIndex
eZImageObject::$ImageLayers
eZImageObject::$TemplateURI
const eZImageObject::ALIGN_AXIS_CENTER = 0x03
const eZImageObject::ALIGN_AXIS_MASK = 0x03
const eZImageObject::ALIGN_AXIS_NONE = 0x00

Alignment values.

Referenced by eZTemplateImageOperator\readImageParameters().

const eZImageObject::ALIGN_AXIS_START = 0x01
const eZImageObject::ALIGN_AXIS_STOP = 0x02
const eZImageObject::PLACE_CONSTANT = 1

Placement types Places the layer absolutely from on the axis.

Referenced by eZTemplateImageOperator\readImageParameters().

const eZImageObject::PLACE_RELATIVE = 2

Places the layer relative to the axis size.

Referenced by eZTemplateImageOperator\readImageParameters().


The documentation for this class was generated from the following file: