eZ Publish  [4.2]
eZImageObject Class Reference

Image object which handles image layers. More...

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

List of all members.

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 Attributes

 $ImageLayerIndex
 $ImageLayers
 $TemplateURI
const ALIGN_AXIS_NONE = 0x00
 Alignment values.
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.
const PLACE_RELATIVE = 2
 Places the layer relative to the axis size.

Detailed Description

Image object which handles image layers.

Definition at line 41 of file ezimageobject.php.


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

Definition at line 185 of file ezimageobject.php.

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.

Definition at line 96 of file ezimageobject.php.

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.

Definition at line 146 of file ezimageobject.php.

eZImageObject::destroy ( )

Cleans up the current image object if it is set.

Reimplemented from eZImageInterface.

Definition at line 235 of file ezimageobject.php.

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

Definition at line 58 of file ezimageobject.php.

eZImageObject::flatten ( )

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

Definition at line 285 of file ezimageobject.php.

Referenced by processImage().

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

Definition at line 161 of file ezimageobject.php.

Referenced by getTransparencyPercent().

eZImageObject::getTransparencyPercent ( parameters)
Returns:
the transparency percentage found in the parameters or 0 if no percentage is found.

Definition at line 174 of file ezimageobject.php.

eZImageObject::hasLayer ( layerID)
Returns:
true if the layer with ID $layerID exists in this image object.

Definition at line 226 of file ezimageobject.php.

eZImageObject::initializeAxis ( parameters,
name 
)

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

Definition at line 127 of file ezimageobject.php.

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

Definition at line 206 of file ezimageobject.php.

eZImageObject::processImage ( )

Flattens the image so that it can be displayed.

Reimplemented from eZImageInterface.

Definition at line 275 of file ezimageobject.php.

eZImageObject::removeLayer ( layerID)

Removes the layer with ID $layerID.

Returns:
true if succesful
See also:
hasLayer, appendLayer

Definition at line 255 of file ezimageobject.php.

eZImageObject::setTemplateURI ( uri)

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

Definition at line 80 of file ezimageobject.php.

eZImageObject::templateData ( )

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

Definition at line 70 of file ezimageobject.php.


Member Data Documentation

eZImageObject::$ImageLayerIndex

Definition at line 350 of file ezimageobject.php.

eZImageObject::$ImageLayers

Definition at line 348 of file ezimageobject.php.

eZImageObject::$TemplateURI

Definition at line 349 of file ezimageobject.php.

Definition at line 48 of file ezimageobject.php.

Referenced by calculateAxisPlacement().

Alignment values.

Definition at line 44 of file ezimageobject.php.

Referenced by initializeAxis(), and eZTemplateImageOperator\readImageParameters().

Placement types Places the layer absolutely from on the axis.

Definition at line 53 of file ezimageobject.php.

Referenced by initializeAxis(), and eZTemplateImageOperator\readImageParameters().

Places the layer relative to the axis size.

Definition at line 55 of file ezimageobject.php.

Referenced by eZTemplateImageOperator\readImageParameters().


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