eZTemplateImageOperator Class Reference
[Template operators]

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

List of all members.


Public Methods

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

Private Attributes

 Operators
 DefaultClass
 The default class to use for text to image conversion.

 FontDir
 the directory were fonts are found, default is ""

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

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

 Family
 the default font family, default is "arial"

 PointSize
 the default font point size, default is 12

 Angle
 the default font angle, default is 0

 XAdjust
 the default font x adjustment, default is 0

 YAdjust
 the default font y adjustment, default is 0

 UseCache
 whether to reuse cache files or not

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

 ImageGDSupported
 Whether image GD is supported.


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 eztemplateimageoperator.php.


Constructor & Destructor Documentation

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

Initializes the image operator with the operator name $name.

Definition at line eztemplateimageoperator.php.

References YAdjust.


Member Function Documentation

eZTemplateImageOperator::angle  
 

Returns:
the angle at which the font is rendered.

Definition at line eztemplateimageoperator.php.

References Angle.

Referenced by modify().

eZTemplateImageOperator::cacheDir  
 

Returns:
the directory where images are created.
See also:
setCacheDir

Definition at line eztemplateimageoperator.php.

References CacheDir.

eZTemplateImageOperator::color   colname
 

Returns the decodecd color for colorname $colname

Definition at line eztemplateimageoperator.php.

References decodeColor().

Referenced by modify().

eZTemplateImageOperator::colors  
 

Returns:
the array of colors in use

Definition at line eztemplateimageoperator.php.

References Colors.

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:
col  The mixed color mode

Definition at line eztemplateimageoperator.php.

Referenced by modify().

eZTemplateImageOperator::family  
 

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

Definition at line eztemplateimageoperator.php.

References Family.

Referenced by modify().

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 eztemplateimageoperator.php.

References FontDir.

Referenced by modify().

eZTemplateImageOperator::heightAdjustment  
 

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

Definition at line eztemplateimageoperator.php.

eZTemplateImageOperator::htmlDir  
 

Returns:
the directory where image is accessible from HTML code.
See also:
setHTMLdir

Definition at line eztemplateimageoperator.php.

References HTMLDir.

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

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

Definition at line eztemplateimageoperator.php.

References YAdjust.

eZTemplateImageOperator::namedParameterList  
 

See eZTemplateOperator::namedParameterList

Definition at line eztemplateimageoperator.php.

eZTemplateImageOperator::namedParameterPerOperator  
 

Returns:
true to tell the template engine that the parameter list exists per operator type.

Definition at line eztemplateimageoperator.php.

& eZTemplateImageOperator::operatorList  
 

Returns the operators in this class.

Definition at line eztemplateimageoperator.php.

References Operators.

eZTemplateImageOperator::pointSize  
 

Returns:
the pointsize of the default font.
See also:
setPointsize

Definition at line eztemplateimageoperator.php.

References PointSize.

eZTemplateImageOperator::setAngle   ang
 

Sets the angle for the default font.

Definition at line eztemplateimageoperator.php.

References Angle.

eZTemplateImageOperator::setCacheDir   dir
 

Sets the directory where images are created.

See also:
cacheDir

Definition at line eztemplateimageoperator.php.

References CacheDir.

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 eztemplateimageoperator.php.

References Colors.

eZTemplateImageOperator::setColors   cols
 

Sets all the colors.

See also:
setColor, color

Definition at line eztemplateimageoperator.php.

References Colors.

eZTemplateImageOperator::setFamily   fam
 

Sets the font family for the default font.

Definition at line eztemplateimageoperator.php.

References Family.

eZTemplateImageOperator::setFontDir   dir
 

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

See also:
fontDir

Definition at line eztemplateimageoperator.php.

References FontDir.

eZTemplateImageOperator::setHeightAdjustment   h
 

Adjustment for height.

See also:
widthAdjustment, heightAdjustment, setWidthAdjustment

Definition at line eztemplateimageoperator.php.

eZTemplateImageOperator::setHTMLDir   dir
 

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

See also:
htmlDir

Definition at line eztemplateimageoperator.php.

References HTMLDir.

eZTemplateImageOperator::setPointSize   size
 

Sets the pointsize for the default font.

Definition at line eztemplateimageoperator.php.

References PointSize.

eZTemplateImageOperator::setUseCache   use
 

Sets whether to reuse cache files or not.

See also:
useCache

Definition at line eztemplateimageoperator.php.

References UseCache.

eZTemplateImageOperator::setWidthAdjustment   w
 

Adjustment for width.

See also:
widthAdjustment, heightAdjustment, setHeightAdjustment

Definition at line eztemplateimageoperator.php.

eZTemplateImageOperator::setXAdjustment   x
 

Adjustment in the x axis.

See also:
xAdjustment, yAdjustment, setYAdjustment

Definition at line eztemplateimageoperator.php.

References XAdjust.

eZTemplateImageOperator::setYAdjustment   y
 

Adjustment in the y axis.

See also:
xAdjustment, yAdjustment, setXAdjustment

Definition at line eztemplateimageoperator.php.

References YAdjust.

eZTemplateImageOperator::useCache  
 

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

Definition at line eztemplateimageoperator.php.

References UseCache.

Referenced by modify().

eZTemplateImageOperator::widthAdjustment  
 

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

Definition at line eztemplateimageoperator.php.

eZTemplateImageOperator::xAdjustment  
 

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

Definition at line eztemplateimageoperator.php.

References XAdjust.

eZTemplateImageOperator::yAdjustment  
 

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

Definition at line eztemplateimageoperator.php.

References YAdjust.


Member Data Documentation

eZTemplateImageOperator::Operators [private]
 

The operator array

Definition at line eztemplateimageoperator.php.

Referenced by operatorList().


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

Exponential