Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZImageTextLayer Class Reference
Image object and layer handling

Layer for text information and rendering. More...

Inheritance diagram for eZImageTextLayer:

## Public Member Functions
| __construct ( $imageObjectRef=null, $imageObject=null, $width=false, $height=false, $font=false, $boundingBox=null, $text=null, $textAngle=0)
| processImage ()
| mergeLayer ( $image, $layerData, $lastLayerData)
| setText ( $text)
| text ()
| setTextAngle ( $textAngle)
| textAngle ()
| textBoundingBox ()
Public Member Functions inherited from eZImageLayer
| __construct ( $imageObjectRef=null, $imageObject=null, $width=false, $height=false, $font=false)
| templateData ()
| setTemplateURI ( $uri)
Public Member Functions inherited from eZImageInterface
| __construct ( $imageObjectRef=null, $imageObject=null, $width=false, $height=false)
| isTruecolor ()
| attributes ()
| hasAttribute ( $name)
| attribute ( $name)
| isProcessed ()
& | hasSize ()
& | imagePath ()
| setAlternativeText ( $text)
| alternativeText ()
| loadPNG ( $storedPath, $storedFile)
| loadJPEG ( $storedPath, $storedFile)
| loadGIF ( $storedPath, $storedFile)
| load ()
| destroy ()
| imageObject ( $createMissing=true)
| process ()
| store ( $fileName, $filePath, $type)
| create ( $width, $height, $useTruecolor=null)
| __clone ()
| 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)
| merge ( $imageObject, $x, $y, $width, $height)
| clear ( $color=false)
| allocateColor ( $name, $red, $green, $blue)
| color ( $name)
| textColor ()
| setTextColor ( $textColor)
| drawText (&$font, $textColor, $text, $x, $y, $angle, $imageObject=null)

## Static Public Member Functions
static | createForText ( $text, &$font, $widthAdjustment, $heightAdjustment, $angle, $absoluteWidth=false, $absoluteHeight=false)
Static Public Member Functions inherited from eZImageLayer
static | createForFile ( $fileName, $filePath, $fileType=false)
Static Public Member Functions inherited from eZImageInterface
static | unregisterImage ( $imageRef)
static | cleanupRegisteredImages ()
static | hasGD2 ()

## Public Attributes
| $TextAngle
| $TextBoundingBox
| $Text
| $Angle
Public Attributes inherited from eZImageLayer
| $TemplateURI
Public Attributes inherited from eZImageInterface
| $TextColor
| $Width
| $Height
| $Font
| $ImageObject
| $ImageObjectRef
| $StoredFile
| $StoredPath
| $StoredType
| $PaletteIndex
| $Palette
| $AlternativeText
| $IsTrueColor
| $IsProcessed

## Additional Inherited Members
Protected Member Functions inherited from eZImageInterface
| imageObjectInternal ( $createMissing=true)
Static Protected Member Functions inherited from eZImageInterface
static | registerImage ( $image)

## Detailed Description

Layer for text information and rendering.

Definition at line 18 of file ezimagetextlayer.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZImageTextLayer::__construct | ( |  | $imageObjectRef = `null`,
|  |  | $imageObject = `null`,
|  |  | $width = `false`,
|  |  | $height = `false`,
|  |  | $font = `false`,
|  |  | $boundingBox = `null`,
|  |  | $text = `null`,
|  |  | $textAngle = `0`
| ) |  |

Definition at line 21 of file ezimagetextlayer.php.

## Member Function Documentation

## ◆ createForText()

static eZImageTextLayer::createForText | ( |  | $text,
|  | & | $font,
|  |  | $widthAdjustment,
|  |  | $heightAdjustment,
|  |  | $angle,
|  |  | $absoluteWidth = `false`,
|  |  | $absoluteHeight = `false`
| ) |  |
| static

Creates a new text layer with the text $text, font $font and adjustment $widthAdjustment and $heightAdjustment at the angle $angle and returns it.

Definition at line 131 of file ezimagetextlayer.php.

References eZDebug\writeError().

Referenced by eZTemplateImageOperator\modify().

## ◆ mergeLayer()

eZImageTextLayer::mergeLayer | ( |  | $image,
|  |  | $layerData,
|  |  | $lastLayerData
| ) |  |

Renders the text with the other layer data. It will perform something that will look like alphablending of the text.

It will copy the area which it will render on from the other layer and render on it and then merge the result back on the other layer using the transparency value. This means that the original image data is kept and the actual text will be transparent.

Reimplemented from eZImageLayer.

Definition at line 55 of file ezimagetextlayer.php.

References eZImageInterface\drawText(), eZImageInterface\font(), eZImageInterface\height(), eZImageInterface\imageObjectInternal(), text(), textAngle(), textBoundingBox(), eZImageInterface\textColor(), and eZImageInterface\width().

## ◆ processImage()

eZImageTextLayer::processImage | ( |  | ) |

\virtual Draws the text on the current image object.

Reimplemented from eZImageInterface.

Definition at line 35 of file ezimagetextlayer.php.

References eZImageInterface\clear(), eZImageInterface\drawText(), eZImageInterface\font(), eZImageInterface\imageObjectInternal(), text(), textAngle(), textBoundingBox(), and eZImageInterface\textColor().

## ◆ setText()

eZImageTextLayer::setText | ( |  | $text | ) |

Sets the current text to $text.

Definition at line 90 of file ezimagetextlayer.php.

## ◆ setTextAngle()

eZImageTextLayer::setTextAngle | ( |  | $textAngle | ) |

Sets the angle of the text to $textAngle.

Definition at line 106 of file ezimagetextlayer.php.

## ◆ text()

eZImageTextLayer::text | ( |  | ) |

Returns
  the current text.

Definition at line 98 of file ezimagetextlayer.php.

References $Text.

Referenced by mergeLayer(), and processImage().

## ◆ textAngle()

eZImageTextLayer::textAngle | ( |  | ) |

Returns
  the current text angle.

Definition at line 114 of file ezimagetextlayer.php.

References $TextAngle.

Referenced by mergeLayer(), and processImage().

## ◆ textBoundingBox()

eZImageTextLayer::textBoundingBox | ( |  | ) |

Returns
  the current bounding box for the text. See the PHP function ImageTTFBBox for more info.

Definition at line 122 of file ezimagetextlayer.php.

References $TextBoundingBox.

Referenced by mergeLayer(), and processImage().

## Member Data Documentation

## ◆ $Angle

eZImageTextLayer::$Angle

Definition at line 171 of file ezimagetextlayer.php.

## ◆ $Text

eZImageTextLayer::$Text

Definition at line 170 of file ezimagetextlayer.php.

Referenced by text().

## ◆ $TextAngle

eZImageTextLayer::$TextAngle

Definition at line 20 of file ezimagetextlayer.php.

Referenced by textAngle().

## ◆ $TextBoundingBox

eZImageTextLayer::$TextBoundingBox

Definition at line 169 of file ezimagetextlayer.php.

Referenced by textBoundingBox().

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

- ezimagetextlayer.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.