eZ Publish  [trunk]
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 18 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 162 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 73 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 123 of file ezimageobject.php.

Cleans up the current image object if it is set.

Reimplemented from eZImageInterface.

Definition at line 210 of file ezimageobject.php.

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

Definition at line 35 of file ezimageobject.php.

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

Definition at line 260 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 138 of file ezimageobject.php.

Referenced by getTransparencyPercent().

Returns:
the transparency percentage found in the parameters or 0 if no percentage is found.

Definition at line 151 of file ezimageobject.php.

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

Definition at line 201 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 104 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 182 of file ezimageobject.php.

Flattens the image so that it can be displayed.

Reimplemented from eZImageInterface.

Definition at line 250 of file ezimageobject.php.

Removes the layer with ID $layerID.

Returns:
true if succesful
See also:
hasLayer, appendLayer

Definition at line 230 of file ezimageobject.php.

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

Definition at line 57 of file ezimageobject.php.

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

Definition at line 47 of file ezimageobject.php.


Member Data Documentation

eZImageObject::$ImageLayerIndex

Definition at line 325 of file ezimageobject.php.

eZImageObject::$ImageLayers

Definition at line 323 of file ezimageobject.php.

eZImageObject::$TemplateURI

Definition at line 324 of file ezimageobject.php.

Definition at line 25 of file ezimageobject.php.

Referenced by calculateAxisPlacement().

Alignment values.

Definition at line 21 of file ezimageobject.php.

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

Placement types Places the layer absolutely from on the axis.

Definition at line 30 of file ezimageobject.php.

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

Places the layer relative to the axis size.

Definition at line 32 of file ezimageobject.php.

Referenced by eZTemplateImageOperator\readImageParameters().


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