eZ Publish  [trunk]
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 23 of file eztemplateimageoperator.php.


Member Function Documentation

Returns:
the angle at which the font is rendered.

Definition at line 394 of file eztemplateimageoperator.php.

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

Definition at line 359 of file eztemplateimageoperator.php.

Returns the decodecd color for colorname $colname

Definition at line 471 of file eztemplateimageoperator.php.

Referenced by modify().

Returns:
the array of colors in use

Definition at line 446 of file eztemplateimageoperator.php.

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 455 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 28 of file eztemplateimageoperator.php.

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

Definition at line 377 of file eztemplateimageoperator.php.

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 350 of file eztemplateimageoperator.php.

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

Definition at line 596 of file eztemplateimageoperator.php.

Referenced by modify().

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

Definition at line 430 of file eztemplateimageoperator.php.

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

Definition at line 368 of file eztemplateimageoperator.php.

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

Definition at line 657 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 97 of file eztemplateimageoperator.php.

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

Definition at line 291 of file eztemplateimageoperator.php.

Returns the operators in this class.

Definition at line 283 of file eztemplateimageoperator.php.

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

Definition at line 386 of file eztemplateimageoperator.php.

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

Definition at line 682 of file eztemplateimageoperator.php.

Referenced by modify().

Sets the angle for the default font.

Definition at line 527 of file eztemplateimageoperator.php.

Sets the directory where images are created.

See also:
cacheDir

Definition at line 494 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 591 of file eztemplateimageoperator.php.

Sets all the colors.

See also:
setColor, color

Definition at line 581 of file eztemplateimageoperator.php.

Sets the font family for the default font.

Definition at line 511 of file eztemplateimageoperator.php.

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

See also:
fontDir

Definition at line 485 of file eztemplateimageoperator.php.

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

See also:
htmlDir

Definition at line 503 of file eztemplateimageoperator.php.

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

Definition at line 633 of file eztemplateimageoperator.php.

Referenced by modify().

Sets the pointsize for the default font.

Definition at line 519 of file eztemplateimageoperator.php.

Sets whether to reuse cache files or not.

See also:
useCache

Definition at line 572 of file eztemplateimageoperator.php.

Adjustment in the x axis.

See also:
xAdjustment, yAdjustment, setYAdjustment

Definition at line 536 of file eztemplateimageoperator.php.

Adjustment in the y axis.

See also:
xAdjustment, yAdjustment, setXAdjustment

Definition at line 545 of file eztemplateimageoperator.php.

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

Definition at line 613 of file eztemplateimageoperator.php.

Referenced by modify().

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

Definition at line 438 of file eztemplateimageoperator.php.

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

Definition at line 421 of file eztemplateimageoperator.php.

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

Definition at line 403 of file eztemplateimageoperator.php.

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

Definition at line 412 of file eztemplateimageoperator.php.


Member Data Documentation

eZTemplateImageOperator::$Angle

the default font angle, default is 0

Definition at line 835 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$CacheDir

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

Definition at line 827 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$Colors

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

Definition at line 843 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$DefaultClass

The default class to use for text to image conversion.

Definition at line 823 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$Family

the default font family, default is "arial"

Definition at line 831 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$FontDir

the directory were fonts are found, default is ""

Definition at line 825 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$HTMLDir

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

Definition at line 829 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$ImageGDSupported

Whether image GD is supported.

Definition at line 845 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$Operators

The operator array.

Definition at line 821 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$PointSize

the default font point size, default is 12

Definition at line 833 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$StoreAs = 'png'

Storage Format, default is "png".

Definition at line 847 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$UseCache

whether to reuse cache files or not

Definition at line 841 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$XAdjust

the default font x adjustment, default is 0

Definition at line 837 of file eztemplateimageoperator.php.

eZTemplateImageOperator::$YAdjust

the default font y adjustment, default is 0

Definition at line 839 of file eztemplateimageoperator.php.


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