eZPublish
4.7
|
Base interface for all image object and layer classes. More...
Public Member Functions | |
__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 () | |
Static Public Member Functions | |
static | cleanupRegisteredImages () |
static | hasGD2 () |
static | unregisterImage ($imageRef) |
Public Attributes | |
$AlternativeText | |
$Font | |
$Height | |
$ImageObject | |
$ImageObjectRef | |
$IsProcessed | |
$IsTrueColor | |
$Palette | |
$PaletteIndex | |
$StoredFile | |
$StoredPath | |
$StoredType | |
$Width | |
Protected Member Functions | |
imageObjectInternal ($createMissing=true) | |
Static Protected Member Functions | |
static | registerImage ($image) |
Private Member Functions | |
attributeFunctionMap () | |
attributeMemberMap () | |
Static Private Member Functions | |
static | createImage ($width, $height, &$useTruecolor) |
Base interface for all image object and layer classes.
eZImageInterface::__clone | ( | ) |
Copies the image from $image as the current image object.
eZImageInterface::allocateColor | ( | $name, | |
$red, | |||
$green, | |||
$blue | |||
) |
Allocates the color $red, $green and $blue with name $name and returns it. Will return the palette index for palette based images and the color value for true color.
eZImageInterface::alternativeText | ( | ) |
eZImageInterface::attribute | ( | $name | ) |
null
if the attribute does not exist.
|
private |
Referenced by attribute(), attributes(), and hasAttribute().
|
private |
Referenced by attribute(), attributes(), and 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.
|
static |
Cleans up all registered images.
Referenced by eZGlobalImageCleanupFunction().
eZImageInterface::clear | ( | $color = false | ) |
Clears the image object with color $color. If $color is not specified it will use the first color set.
Referenced by eZImageTextLayer\processImage().
eZImageInterface::cloneImage | ( | $imageObject, | |
$width, | |||
$height, | |||
$useTruecolor = null |
|||
) |
Clones the image object $imageObject with width $width, height $height and truecolor settings $useTruecolor.
Referenced by __clone().
eZImageInterface::color | ( | $name | ) |
Referenced by clear(), and drawText().
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.
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.
Referenced by imageObjectInternal().
|
staticprivate |
Creates an image with size $width and $height using GD and returns it.
Referenced by cloneImage(), and create().
eZImageInterface::destroy | ( | ) |
Cleans up the current image object if it is set.
Referenced by cloneImage(), and create().
eZImageInterface::drawText | ( | & | $font, |
$textColor, | |||
$text, | |||
$x, | |||
$y, | |||
$angle, | |||
$imageObject = null |
|||
) |
Draws the text $text using the font $font and color $textColor at position $x and $y with angle $angle. If $imageObject is specified it will use that for drawing instead of the current image.
Referenced by eZImageTextLayer\mergeLayer(), and eZImageTextLayer\processImage().
eZImageInterface::eZImageInterface | ( | $imageObjectRef = null , |
|
$imageObject = null , |
|||
$width = false , |
|||
$height = false |
|||
) |
Referenced by eZImageLayer\eZImageLayer(), and eZImageObject\eZImageObject().
eZImageInterface::font | ( | ) |
null
if not font object has been set. Referenced by eZImageTextLayer\mergeLayer(), and eZImageTextLayer\processImage().
eZImageInterface::hasAttribute | ( | $name | ) |
|
static |
Referenced by createImage().
& eZImageInterface::hasSize | ( | ) |
eZImageInterface::height | ( | ) |
Referenced by __clone(), eZImageObject\calculatePosition(), eZImageObject\flatten(), eZImageLayer\mergeLayer(), and eZImageTextLayer\mergeLayer().
eZImageInterface::imageObject | ( | $createMissing = true | ) |
null
if no image is available. Referenced by __clone(), eZImageLayer\mergeLayer(), and store().
|
protected |
Referenced by eZImageTextLayer\mergeLayer(), and eZImageTextLayer\processImage().
& eZImageInterface::imagePath | ( | ) |
eZImageInterface::isProcessed | ( | ) |
eZImageInterface::isTruecolor | ( | ) |
Referenced by __clone(), and eZImageLayer\mergeLayer().
eZImageInterface::load | ( | ) |
Tries to load the stored image set by setStoredFile(). If the stored type is not set it will try all formats until one succeeds.
Referenced by processImage().
eZImageInterface::loadGIF | ( | $storedPath, | |
$storedFile | |||
) |
Tries to load the GIF image from the path $storedPath and file $storedFile into the current image object.
Referenced by load().
eZImageInterface::loadJPEG | ( | $storedPath, | |
$storedFile | |||
) |
Tries to load the JPEG image from the path $storedPath and file $storedFile into the current image object.
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.
Referenced by load().
eZImageInterface::merge | ( | $imageObject, | |
$x, | |||
$y, | |||
$width, | |||
$height | |||
) |
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.
$transparency | determines how transparent the source image is. 0 is the same as copyImage and 100 is the same is no copy is made. |
eZImageInterface::process | ( | ) |
Makes sure the image object is processed and rendered. Calls processImage() which is implemented by all descendants of this class to do the real work.
Referenced by imageObject(), and store().
eZImageInterface::processImage | ( | ) |
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.
Referenced by process().
|
staticprotected |
Registers the GD image object $image for destruction upon script end. This makes sure that image resources are cleaned up after use.
Referenced by cloneImage(), create(), loadGIF(), loadJPEG(), and 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.
eZImageInterface::setFont | ( | $font | ) |
Sets the current font object to $font.
Referenced by eZImageLayer\eZImageLayer().
eZImageInterface::setHeight | ( | $h | ) |
Sets the height of the image to $h.
Referenced by eZImageObject\flatten().
eZImageInterface::setStoredFile | ( | $file, | |
$path, | |||
$type | |||
) |
Sets the path, file and type of the stored file. These settings will be used by load().
eZImageInterface::setTextColor | ( | $textColor | ) |
Sets the color used for text drawing to $textColor.
eZImageInterface::setWidth | ( | $w | ) |
Sets the width of the image to $w.
Referenced by eZImageObject\flatten().
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
.
eZImageInterface::textColor | ( | ) |
Referenced by eZImageTextLayer\mergeLayer(), and eZImageTextLayer\processImage().
|
static |
Tries to unregister the image with reference $imageRef
Referenced by destroy().
eZImageInterface::width | ( | ) |
Referenced by __clone(), eZImageObject\calculatePosition(), eZImageObject\flatten(), eZImageLayer\mergeLayer(), and eZImageTextLayer\mergeLayer().
eZImageInterface::$AlternativeText |
Referenced by alternativeText().
eZImageInterface::$Font |
Referenced by font().
eZImageInterface::$Height |
Referenced by height().
eZImageInterface::$ImageObject |
Referenced by drawText(), imageObject(), and imageObjectInternal().
eZImageInterface::$ImageObjectRef |
eZImageInterface::$IsProcessed |
Referenced by isProcessed().
eZImageInterface::$IsTrueColor |
Referenced by isTruecolor().
eZImageInterface::$Palette |
eZImageInterface::$PaletteIndex |
eZImageInterface::$StoredFile |
Referenced by imagePath().
eZImageInterface::$StoredPath |
eZImageInterface::$StoredType |
eZImageInterface::$Width |
Referenced by width().