eZ Publish  [4.2]
eZTemplateImageOperator Class Reference

Text to image conversion using operator "texttoimage". More...

List of all members.

Public Member Functions

 angle ()
 cacheDir ()
 color ($colname)
 colors ()
 decodeColor ($col)
 eZTemplateImageOperator ($texttoimageName="texttoimage", $imageName="image", $imagefileName="imagefile")
 family ()
 fontDir ()
 hasImage ($dirs, $base, $md5Text, $alternativeText, $imageType)
 heightAdjustment ()
 htmlDir ()
 loadImage ($dirs, $base, $md5Text, $alternativeText, $imageType)
 modify ($tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$inputValue, $namedParameters, $placement)
 namedParameterList ()
 namedParameterPerOperator ()
 operatorList ()
 operatorTemplateHints ()
 pointSize ()
 readImageParameters ($tpl, $image, $operatorParameters, $rootNamespace, $currentNamespace, &$md5Input, &$alternativeText, $placement)
 setAngle ($ang)
 setCacheDir ($dir)
 setColor ($colname, $colval)
 setColors ($cols)
 setFamily ($fam)
 setFontDir ($dir)
 setHeightAdjustment ($h)
 setHTMLDir ($dir)
 setLoadImage ($image, $dirs, $base, $md5Text, $alternativeText, $imageType)
 setPointSize ($size)
 setUseCache ($use)
 setWidthAdjustment ($w)
 setXAdjustment ($x)
 setYAdjustment ($y)
 storeImage ($image, $dirs, $base, $md5Text, $alternativeText, $imageType)
 useCache ()
 widthAdjustment ()
 xAdjustment ()
 yAdjustment ()

Public Attributes

 $Angle
 the default font angle, default is 0
 $CacheDir
 the directory were cache files are created, default is ""
 $Colors
 the color array, default is bgcolor=white and textcolor=black
 $DefaultClass
 The default class to use for text to image conversion.
 $Family
 the default font family, default is "arial"
 $FontDir
 the directory were fonts are found, default is ""
 $HTMLDir
 the directory were html code finds the images, default is ""
 $ImageGDSupported
 Whether image GD is supported.
 $Operators
 The operator array.
 $PointSize
 the default font point size, default is 12
 $StoreAs = 'png'
 Storage Format, default is "png".
 $UseCache
 whether to reuse cache files or not
 $XAdjust
 the default font x adjustment, default is 0
 $YAdjust
 the default font y adjustment, default is 0

Detailed Description

Text to image conversion using operator "texttoimage".

This operator allows a piece of text be converted to an image file representing the text. The output image is written in PNG format. Use setFontDir() and setCacheDir() to change where the font is located and where the cache file should be put. If fontDir() is an empty string the font will be looked for in the system.

Definition at line 43 of file eztemplateimageoperator.php.


Member Function Documentation

eZTemplateImageOperator::angle ( )
Returns:
the angle at which the font is rendered.

Definition at line 414 of file eztemplateimageoperator.php.

eZTemplateImageOperator::cacheDir ( )
Returns:
the directory where images are created.
See also:
setCacheDir

Definition at line 379 of file eztemplateimageoperator.php.

eZTemplateImageOperator::color ( colname)

Returns the decodecd color for colorname $colname

Definition at line 491 of file eztemplateimageoperator.php.

Referenced by modify().

eZTemplateImageOperator::colors ( )
Returns:
the array of colors in use

Definition at line 466 of file eztemplateimageoperator.php.

eZTemplateImageOperator::decodeColor ( col)

Takes a mixed mode color representation and decodes it to a an array of three elements which represents the R, G and B color elements.

Parameters:
colThe mixed color mode

Definition at line 475 of file eztemplateimageoperator.php.

Referenced by color(), and modify().

eZTemplateImageOperator::eZTemplateImageOperator ( texttoimageName = "texttoimage",
imageName = "image",
imagefileName = "imagefile" 
)

Initializes the image operator with the operator name $name.

Definition at line 48 of file eztemplateimageoperator.php.

eZTemplateImageOperator::family ( )
Returns:
the family name of the default font.
See also:
setFamily

Definition at line 397 of file eztemplateimageoperator.php.

eZTemplateImageOperator::fontDir ( )
Returns:
the directory where fonts are located. If it is empty the font is looked for in the system font dirs.
See also:
setFontDir

Definition at line 370 of file eztemplateimageoperator.php.

eZTemplateImageOperator::hasImage ( dirs,
base,
md5Text,
alternativeText,
imageType 
)

Definition at line 616 of file eztemplateimageoperator.php.

Referenced by modify().

eZTemplateImageOperator::heightAdjustment ( )
Returns:
the number of pixels the height of the image is adjusted.
See also:
setHeightAdjustment, widthAdjustment

Definition at line 450 of file eztemplateimageoperator.php.

eZTemplateImageOperator::htmlDir ( )
Returns:
the directory where image is accessible from HTML code.
See also:
setHTMLdir

Definition at line 388 of file eztemplateimageoperator.php.

eZTemplateImageOperator::loadImage ( dirs,
base,
md5Text,
alternativeText,
imageType 
)

Definition at line 677 of file eztemplateimageoperator.php.

Referenced by modify().

eZTemplateImageOperator::modify ( tpl,
operatorName,
operatorParameters,
rootNamespace,
currentNamespace,
&$  inputValue,
namedParameters,
placement 
)

Performs image conversion using Image GD and returns the html text for the image.

Definition at line 117 of file eztemplateimageoperator.php.

eZTemplateImageOperator::namedParameterList ( )
eZTemplateImageOperator::namedParameterPerOperator ( )
Returns:
true to tell the template engine that the parameter list exists per operator type.

Definition at line 311 of file eztemplateimageoperator.php.

eZTemplateImageOperator::operatorList ( )

Returns the operators in this class.

Definition at line 303 of file eztemplateimageoperator.php.

eZTemplateImageOperator::operatorTemplateHints ( )

Definition at line 97 of file eztemplateimageoperator.php.

eZTemplateImageOperator::pointSize ( )
Returns:
the pointsize of the default font.
See also:
setPointsize

Definition at line 406 of file eztemplateimageoperator.php.

eZTemplateImageOperator::readImageParameters ( tpl,
image,
operatorParameters,
rootNamespace,
currentNamespace,
&$  md5Input,
&$  alternativeText,
placement 
)

Definition at line 702 of file eztemplateimageoperator.php.

Referenced by modify().

eZTemplateImageOperator::setAngle ( ang)

Sets the angle for the default font.

Definition at line 547 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setCacheDir ( dir)

Sets the directory where images are created.

See also:
cacheDir

Definition at line 514 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setColor ( colname,
colval 
)

Sets the colorname $colname to color value $colval. The colval is a mixed color mode so different values can be input.

See also:
setColors, color

Definition at line 611 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setColors ( cols)

Sets all the colors.

See also:
setColor, color

Definition at line 601 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setFamily ( fam)

Sets the font family for the default font.

Definition at line 531 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setFontDir ( dir)

Sets the font directory, see fontDir() for more information.

See also:
fontDir

Definition at line 505 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setHeightAdjustment ( h)

Adjustment for height.

See also:
widthAdjustment, heightAdjustment, setWidthAdjustment

Definition at line 583 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setHTMLDir ( dir)

Sets the directory which the HTML code uses to acces the image.

See also:
htmlDir

Definition at line 523 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setLoadImage ( image,
dirs,
base,
md5Text,
alternativeText,
imageType 
)

Definition at line 653 of file eztemplateimageoperator.php.

Referenced by modify().

eZTemplateImageOperator::setPointSize ( size)

Sets the pointsize for the default font.

Definition at line 539 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setUseCache ( use)

Sets whether to reuse cache files or not.

See also:
useCache

Definition at line 592 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setWidthAdjustment ( w)

Adjustment for width.

See also:
widthAdjustment, heightAdjustment, setHeightAdjustment

Definition at line 574 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setXAdjustment ( x)

Adjustment in the x axis.

See also:
xAdjustment, yAdjustment, setYAdjustment

Definition at line 556 of file eztemplateimageoperator.php.

eZTemplateImageOperator::setYAdjustment ( y)

Adjustment in the y axis.

See also:
xAdjustment, yAdjustment, setXAdjustment

Definition at line 565 of file eztemplateimageoperator.php.

eZTemplateImageOperator::storeImage ( image,
dirs,
base,
md5Text,
alternativeText,
imageType 
)

Definition at line 633 of file eztemplateimageoperator.php.

Referenced by modify().

eZTemplateImageOperator::useCache ( )
Returns:
true if image cache should be reused if the image text etc.. hasn't changed.

Definition at line 458 of file eztemplateimageoperator.php.

eZTemplateImageOperator::widthAdjustment ( )
Returns:
the number of pixels the width of the image is adjusted.
See also:
setWidthAdjustment, heightAdjustment

Definition at line 441 of file eztemplateimageoperator.php.

eZTemplateImageOperator::xAdjustment ( )
Returns:
the number of pixels the font is adjusted in the X direction.
See also:
setXAdjustment, yAdjustment

Definition at line 423 of file eztemplateimageoperator.php.

eZTemplateImageOperator::yAdjustment ( )
Returns:
the number of pixels the font is adjusted in the Y direction.
See also:
setYAdjustment, xAdjustment

Definition at line 432 of file eztemplateimageoperator.php.


Member Data Documentation

eZTemplateImageOperator::$Angle

the default font angle, default is 0

Definition at line 855 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$CacheDir

the directory were cache files are created, default is ""

Definition at line 847 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$Colors

the color array, default is bgcolor=white and textcolor=black

Definition at line 863 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$DefaultClass

The default class to use for text to image conversion.

Definition at line 843 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$Family

the default font family, default is "arial"

Definition at line 851 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$FontDir

the directory were fonts are found, default is ""

Definition at line 845 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$HTMLDir

the directory were html code finds the images, default is ""

Definition at line 849 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$ImageGDSupported

Whether image GD is supported.

Definition at line 865 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$Operators

The operator array.

Definition at line 841 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$PointSize

the default font point size, default is 12

Definition at line 853 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$StoreAs = 'png'

Storage Format, default is "png".

Definition at line 867 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$UseCache

whether to reuse cache files or not

Definition at line 861 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$XAdjust

the default font x adjustment, default is 0

Definition at line 857 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$YAdjust

the default font y adjustment, default is 0

Definition at line 859 of file eztemplateimageoperator.php.


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