eZImageInterface Class ReferenceBase interface for all image object and layer classes.
More...
Inheritance diagram for eZImageInterface:
List of all members.
|
Public Methods |
| | isTruecolor () |
| | attributes () |
| | hasAttribute ($name) |
| & | attribute ($name) |
| | isProcessed () |
| | hasSize () |
| & | imagePath () |
| | setAlternativeText ($text) |
| & | alternativeText () |
| | unregisterImage ($imageRef) |
| | cleanupRegisteredImages () |
| | loadPNG ($storedPath,$storedFile) |
| | loadJPEG ($storedPath,$storedFile) |
| | load () |
| | destroy () |
| | imageObject ($createMissing=true) |
| | process () |
| | processImage () |
| | store ($fileName,$filePath,$type) |
| | create ($width,$height,$useTruecolor=null) |
| | clone (&$image) |
| | cloneImage ($imageObject,$width,$height,$useTruecolor=null) |
| | width () |
| | height () |
| | setWidth ($w) |
| | setHeight ($h) |
| | setStoredFile ($file,$path,$type) |
| | setFont ($font) |
| | font () |
| | copyImage ($destinationImageObject,$imageObject,$destinationX,$destinationY,$sourceWidth,$sourceHeight,$sourceX=0,$sourceY=0) |
| | mergeImage ($destinationImageObject,$imageObject,$destinationX,$destinationY,$sourceWidth,$sourceHeight,$sourceX=0,$sourceY=0,$transparency=0) |
| | blendImage ($destinationImageObject,$imageObject,$destinationX,$destinationY,$sourceWidth,$sourceHeight,$sourceX=0,$sourceY=0) |
| | clear ($color=false) |
| | allocateColor ($name,$red,$green,$blue) |
| | color ($name) |
| | textColor () |
| | setTextColor ($textColor) |
| | drawText (&$font,$textColor,$text,$x,$y,$angle,$imageObject=null) |
Static Public Methods |
| | hasGD2 () |
Public Attributes |
|
| Width |
| | \privatesection
|
Protected Methods |
| | registerImage ($image) |
| | imageObjectInternal ($createMissing=true) |
Private Methods |
| | attributeMemberMap () |
| | attributeFunctionMap () |
Static Private Methods |
| | createImage ($width,$height,&$useTruecolor) |
Detailed Description
Base interface for all image object and layer classes.
Definition at line ezimageinterface.php.
Member Function Documentation
| eZImageInterface::allocateColor |
( |
$ |
name, |
|
|
$ |
red, |
|
|
$ |
green, |
|
|
$ |
blue |
|
) |
|
|
| & eZImageInterface::alternativeText |
( |
|
) |
|
|
| & eZImageInterface::attribute |
( |
$ |
name |
) |
|
|
| eZImageInterface::attributeFunctionMap |
( |
|
) |
[private] |
|
| eZImageInterface::attributeMemberMap |
( |
|
) |
[private] |
|
|
|
- Returns:
-
a map array which maps from an attribute name to a member variable. Used by attributes, hasAttribute and attribute.
Definition at line ezimageinterface.php.
References width().
Referenced by hasAttribute(). |
| eZImageInterface::attributes |
( |
|
) |
|
|
| eZImageInterface::blendImage |
( |
$ |
destinationImageObject, |
|
|
$ |
imageObject, |
|
|
$ |
destinationX, |
|
|
$ |
destinationY, |
|
|
$ |
sourceWidth, |
|
|
$ |
sourceHeight, |
|
|
$ |
sourceX = 0, |
|
|
$ |
sourceY = 0 |
|
) |
|
|
|
|
Alpha blends the image $imageObject with size $sourceWidth and $sourceHeight and position $sourceX and $sourceY onto the destination image $destinationImageObject at position $destinationX and $destinationY. - Note:
-
This required GD2 and uses color 0 (black) for blending.
Definition at line ezimageinterface.php.
References imageObject(). |
| eZImageInterface::cleanupRegisteredImages |
( |
|
) |
|
|
| eZImageInterface::clear |
( |
$ |
color = false |
) |
|
|
| eZImageInterface::clone |
( |
&$ |
image |
) |
|
|
| eZImageInterface::cloneImage |
( |
$ |
imageObject, |
|
|
$ |
width, |
|
|
$ |
height, |
|
|
$ |
useTruecolor = null |
|
) |
|
|
|
|
Clones the image object $imageObject with width $width, height $height and truecolor settings $useTruecolor.
Definition at line ezimageinterface.php.
References width().
Referenced by clone(). |
| eZImageInterface::color |
( |
$ |
name |
) |
|
|
| eZImageInterface::copyImage |
( |
$ |
destinationImageObject, |
|
|
$ |
imageObject, |
|
|
$ |
destinationX, |
|
|
$ |
destinationY, |
|
|
$ |
sourceWidth, |
|
|
$ |
sourceHeight, |
|
|
$ |
sourceX = 0, |
|
|
$ |
sourceY = 0 |
|
) |
|
|
|
|
Copies the image $imageObject with size $sourceWidth and $sourceHeight and position $sourceX and $sourceY onto the destination image $destinationImageObject at position $destinationX and $destinationY.
Definition at line ezimageinterface.php.
References imageObject(). |
| eZImageInterface::create |
( |
$ |
width, |
|
|
$ |
height, |
|
|
$ |
useTruecolor = null |
|
) |
|
|
|
|
Creates a new image object with width $width and height $height. $useTruecolor determines the type of image, if true it will be truecolor, if false it will be palette based or if null it will create it depending on the GD version. GD 2 will get truecolor while < 2 will get palette based.
Definition at line ezimageinterface.php.
References width().
Referenced by imageObjectInternal(). |
| eZImageInterface::createImage |
( |
$ |
width, |
|
|
$ |
height, |
|
|
&$ |
useTruecolor |
|
) |
[static, private] |
|
| eZImageInterface::destroy |
( |
|
) |
|
|
| eZImageInterface::drawText |
( |
&$ |
font, |
|
|
$ |
textColor, |
|
|
$ |
text, |
|
|
$ |
x, |
|
|
$ |
y, |
|
|
$ |
angle, |
|
|
$ |
imageObject = null |
|
) |
|
|
| eZImageInterface::font |
( |
|
) |
|
|
| eZImageInterface::hasAttribute |
( |
$ |
name |
) |
|
|
| eZImageInterface::hasGD2 |
( |
|
) |
[static] |
|
| eZImageInterface::hasSize |
( |
|
) |
|
|
| eZImageInterface::height |
( |
|
) |
|
|
| eZImageInterface::imageObject |
( |
$ |
createMissing = true |
) |
|
|
|
|
- Returns:
-
the current image object, if $createMissing is true if will run the image processing to make sure it is created. Returns
null if no image is available.
- See also:
-
imageObjectInternal
Definition at line ezimageinterface.php.
References process().
Referenced by store(). |
| eZImageInterface::imageObjectInternal |
( |
$ |
createMissing = true |
) |
[protected] |
|
| & eZImageInterface::imagePath |
( |
|
) |
|
|
| eZImageInterface::isProcessed |
( |
|
) |
|
|
|
|
- Returns:
-
true if the image object has been processed, this means that image has been rendered.
Definition at line ezimageinterface.php. |
| eZImageInterface::isTruecolor |
( |
|
) |
|
|
|
|
- Returns:
-
true if the image is true color. True color images behave differently from palette based and GD has problems with mixing the two types.
Definition at line ezimageinterface.php. |
| eZImageInterface::load |
( |
|
) |
|
|
| eZImageInterface::loadJPEG |
( |
$ |
storedPath, |
|
|
$ |
storedFile |
|
) |
|
|
|
|
Tries to load the JPEG image from the path $storedPath and file $storedFile into the current image object. - Returns:
-
true if succesful.
Definition at line ezimageinterface.php.
References registerImage().
Referenced by load(). |
| eZImageInterface::loadPNG |
( |
$ |
storedPath, |
|
|
$ |
storedFile |
|
) |
|
|
|
|
Tries to load the PNG image from the path $storedPath and file $storedFile into the current image object. - Returns:
-
true if succesful.
Definition at line ezimageinterface.php.
References registerImage().
Referenced by load(). |
| eZImageInterface::mergeImage |
( |
$ |
destinationImageObject, |
|
|
$ |
imageObject, |
|
|
$ |
destinationX, |
|
|
$ |
destinationY, |
|
|
$ |
sourceWidth, |
|
|
$ |
sourceHeight, |
|
|
$ |
sourceX = 0, |
|
|
$ |
sourceY = 0, |
|
|
$ |
transparency = 0 |
|
) |
|
|
|
|
Merges the image $imageObject with size $sourceWidth and $sourceHeight and position $sourceX and $sourceY with the destination image $destinationImageObject at position $destinationX and $destinationY. The merged image is placed on the $destinationImageObject. - Parameters:
-
| transparency |
determines how transparent the source image is. 0 is the same as copyImage and 100 is the same is no copy is made. |
Definition at line ezimageinterface.php.
References imageObject(). |
| eZImageInterface::process |
( |
|
) |
|
|
| eZImageInterface::processImage |
( |
|
) |
|
|
|
|
\virtual Tries to render an image onto the image object, each inheriting class must override this to do somethign sensible. By default it will try to load the stored image if one is set. - Returns:
-
true if the image was succesfully processed.
Reimplemented in eZImageTextLayer.
Definition at line ezimageinterface.php.
References eZDebug::writeWarning().
Referenced by process(). |
| eZImageInterface::registerImage |
( |
$ |
image |
) |
[protected] |
|
|
|
Registers the GD image object $image for destruction upon script end. This makes sure that image resources are cleaned up after use. - Returns:
-
a reference for the image which can be used in unregisterImage later on.
Definition at line ezimageinterface.php.
Referenced by loadPNG(). |
| eZImageInterface::setAlternativeText |
( |
$ |
text |
) |
|
|
|
|
Sets the alternative text to $text, it will be used for describing the image and can be used by browsers that cannot view images.
Definition at line ezimageinterface.php. |
| eZImageInterface::setFont |
( |
$ |
font |
) |
|
|
| eZImageInterface::setHeight |
( |
$ |
h |
) |
|
|
| eZImageInterface::setStoredFile |
( |
$ |
file, |
|
|
$ |
path, |
|
|
$ |
type |
|
) |
|
|
| eZImageInterface::setTextColor |
( |
$ |
textColor |
) |
|
|
| eZImageInterface::setWidth |
( |
$ |
w |
) |
|
|
| eZImageInterface::store |
( |
$ |
fileName, |
|
|
$ |
filePath, |
|
|
$ |
type |
|
) |
|
|
|
|
Stores the current image object to disk, the image is stored in the path $filePath with filename $fileName. The parameter $type determines the image format, supported are png and jpg. - Returns:
-
true if the image was stored correctly.
Definition at line ezimageinterface.php.
References eZDebug::writeError().
Referenced by store(). |
| eZImageInterface::textColor |
( |
|
) |
|
|
| eZImageInterface::unregisterImage |
( |
$ |
imageRef |
) |
|
|
| eZImageInterface::width |
( |
|
) |
|
|
The documentation for this class was generated from the following file:
|