eZPublishCommunityProject(LegacyStack)  2013.9
eZTemplateImageOperator Class Reference

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

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

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.

Member Function Documentation

eZTemplateImageOperator::angle ( )
Returns
the angle at which the font is rendered.
eZTemplateImageOperator::cacheDir ( )
Returns
the directory where images are created.
See Also
setCacheDir
eZTemplateImageOperator::color (   $colname)

Returns the decodecd color for colorname $colname

Referenced by modify().

eZTemplateImageOperator::colors ( )
Returns
the array of colors in use
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

Referenced by color(), and modify().

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

Initializes the image operator with the operator name $name.

eZTemplateImageOperator::family ( )
Returns
the family name of the default font.
See Also
setFamily
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
eZTemplateImageOperator::hasImage (   $dirs,
  $base,
  $md5Text,
  $alternativeText,
  $imageType 
)

Referenced by modify().

eZTemplateImageOperator::heightAdjustment ( )
Returns
the number of pixels the height of the image is adjusted.
See Also
setHeightAdjustment, widthAdjustment
eZTemplateImageOperator::htmlDir ( )
Returns
the directory where image is accessible from HTML code.
See Also
setHTMLdir
eZTemplateImageOperator::loadImage (   $dirs,
  $base,
  $md5Text,
  $alternativeText,
  $imageType 
)

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.

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

Returns the operators in this class.

eZTemplateImageOperator::operatorTemplateHints ( )
eZTemplateImageOperator::pointSize ( )
Returns
the pointsize of the default font.
See Also
setPointsize
eZTemplateImageOperator::readImageParameters (   $tpl,
  $image,
  $operatorParameters,
  $rootNamespace,
  $currentNamespace,
$md5Input,
$alternativeText,
  $placement 
)

Referenced by modify().

eZTemplateImageOperator::setAngle (   $ang)

Sets the angle for the default font.

eZTemplateImageOperator::setCacheDir (   $dir)

Sets the directory where images are created.

See Also
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
eZTemplateImageOperator::setColors (   $cols)

Sets all the colors.

See Also
setColor, color
eZTemplateImageOperator::setFamily (   $fam)

Sets the font family for the default font.

eZTemplateImageOperator::setFontDir (   $dir)

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

See Also
fontDir
eZTemplateImageOperator::setHeightAdjustment (   $h)

Adjustment for height.

See Also
widthAdjustment, heightAdjustment, setWidthAdjustment
eZTemplateImageOperator::setHTMLDir (   $dir)

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

See Also
htmlDir
eZTemplateImageOperator::setLoadImage (   $image,
  $dirs,
  $base,
  $md5Text,
  $alternativeText,
  $imageType 
)

Referenced by modify().

eZTemplateImageOperator::setPointSize (   $size)

Sets the pointsize for the default font.

eZTemplateImageOperator::setUseCache (   $use)

Sets whether to reuse cache files or not.

See Also
useCache
eZTemplateImageOperator::setWidthAdjustment (   $w)

Adjustment for width.

See Also
widthAdjustment, heightAdjustment, setHeightAdjustment
eZTemplateImageOperator::setXAdjustment (   $x)

Adjustment in the x axis.

See Also
xAdjustment, yAdjustment, setYAdjustment
eZTemplateImageOperator::setYAdjustment (   $y)

Adjustment in the y axis.

See Also
xAdjustment, yAdjustment, setXAdjustment
eZTemplateImageOperator::storeImage (   $image,
  $dirs,
  $base,
  $md5Text,
  $alternativeText,
  $imageType 
)

Referenced by modify().

eZTemplateImageOperator::useCache ( )
Returns
true if image cache should be reused if the image text etc.. hasn't changed.
eZTemplateImageOperator::widthAdjustment ( )
Returns
the number of pixels the width of the image is adjusted.
See Also
setWidthAdjustment, heightAdjustment
eZTemplateImageOperator::xAdjustment ( )
Returns
the number of pixels the font is adjusted in the X direction.
See Also
setXAdjustment, yAdjustment
eZTemplateImageOperator::yAdjustment ( )
Returns
the number of pixels the font is adjusted in the Y direction.
See Also
setYAdjustment, xAdjustment

Member Data Documentation

eZTemplateImageOperator::$Angle

the default font angle, default is 0

Referenced by angle(), and modify().

eZTemplateImageOperator::$CacheDir

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

Referenced by cacheDir().

eZTemplateImageOperator::$Colors

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

Referenced by colors().

eZTemplateImageOperator::$DefaultClass

The default class to use for text to image conversion.

eZTemplateImageOperator::$Family

the default font family, default is "arial"

Referenced by family(), and modify().

eZTemplateImageOperator::$FontDir

the directory were fonts are found, default is ""

Referenced by fontDir().

eZTemplateImageOperator::$HTMLDir

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

Referenced by htmlDir().

eZTemplateImageOperator::$ImageGDSupported

Whether image GD is supported.

eZTemplateImageOperator::$Operators

The operator array.

Referenced by operatorList().

eZTemplateImageOperator::$PointSize

the default font point size, default is 12

Referenced by modify(), and pointSize().

eZTemplateImageOperator::$StoreAs = 'png'

Storage Format, default is "png".

eZTemplateImageOperator::$UseCache

whether to reuse cache files or not

Referenced by modify(), and useCache().

eZTemplateImageOperator::$XAdjust

the default font x adjustment, default is 0

Referenced by modify(), and xAdjustment().

eZTemplateImageOperator::$YAdjust

the default font y adjustment, default is 0

Referenced by modify(), and yAdjustment().


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