Documentation TYPO3 par Ameos

tslib_gifBuilder Class Reference

Inheritance diagram for tslib_gifBuilder:

Inheritance graph
[legend]
Collaboration diagram for tslib_gifBuilder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 start ($conf, $data)
 gifBuild ()
 make ()
 checkTextObj ($conf)
 calcOffset ($string)
 getResource ($file, $fileArray)
 checkFile ($file)
 fileName ($pre)
 extension ()
 start ($conf, $data)
 gifBuild ()
 make ()
 checkTextObj ($conf)
 calcOffset ($string)
 getResource ($file, $fileArray)
 checkFile ($file)
 fileName ($pre)
 extension ()

Public Attributes

 $im = ''
 $w = 0
 $h = 0
 $map
 $workArea
 $setup = Array ()
 $data = Array()
 $objBB = Array()
 $myClassName = 'gifbuilder'
 $charRangeMap = array()

Detailed Description

Definition at line 102 of file class.tslib_gifbuilder.php.


Member Function Documentation

tslib_gifBuilder::calcOffset string  ) 
 

Calculation of offset using "splitCalc" and insertion of dimensions from other GIFBUILDER objects.

Example: Input: 2+2, 2*3, 123, [10.w] Output: 4,6,123,45 (provided that the width of object in position 10 was 45 pixels wide)

Parameters:
string The string to resolve/calculate the result of. The string is divided by a comma first and each resulting part is calculated into an integer.
Returns:
string The resolved string with each part (separated by comma) returned separated by comma private

Definition at line 552 of file class.tslib_gifbuilder.php.

References t3lib_div::splitCalc().

tslib_gifBuilder::calcOffset string  ) 
 

Calculation of offset using "splitCalc" and insertion of dimensions from other GIFBUILDER objects.

Example: Input: 2+2, 2*3, 123, [10.w] Output: 4,6,123,45 (provided that the width of object in position 10 was 45 pixels wide)

Parameters:
string The string to resolve/calculate the result of. The string is divided by a comma first and each resulting part is calculated into an integer.
Returns:
string The resolved string with each part (separated by comma) returned separated by comma private

Definition at line 552 of file class.tslib_gifbuilder.php.

References t3lib_div::splitCalc().

Referenced by start().

tslib_gifBuilder::checkFile file  ) 
 

Returns the reference to a "resource" in TypoScript.

Parameters:
string The resource value.
Returns:
string Returns the relative filepath private
See also:
t3lib_TStemplate::getFileName()

Reimplemented from t3lib_stdGraphic.

Definition at line 616 of file class.tslib_gifbuilder.php.

tslib_gifBuilder::checkFile file  ) 
 

Returns the reference to a "resource" in TypoScript.

Parameters:
string The resource value.
Returns:
string Returns the relative filepath private
See also:
t3lib_TStemplate::getFileName()

Reimplemented from t3lib_stdGraphic.

Definition at line 616 of file class.tslib_gifbuilder.php.

Referenced by checkTextObj().

tslib_gifBuilder::checkTextObj conf  ) 
 

Initializing/Cleaning of TypoScript properties for TEXT GIFBUILDER objects

'cleans' TEXT-object; Checks fontfile and other vital setup Finds the title if its a 'variable' (instantiates a cObj and loads it with the ->data record) Performs caseshift if any.

Parameters:
array GIFBUILDER object TypoScript properties
Returns:
array Modified $conf array IF the "text" property is not blank private

Definition at line 475 of file class.tslib_gifbuilder.php.

References checkFile(), and t3lib_div::makeInstance().

tslib_gifBuilder::checkTextObj conf  ) 
 

Initializing/Cleaning of TypoScript properties for TEXT GIFBUILDER objects

'cleans' TEXT-object; Checks fontfile and other vital setup Finds the title if its a 'variable' (instantiates a cObj and loads it with the ->data record) Performs caseshift if any.

Parameters:
array GIFBUILDER object TypoScript properties
Returns:
array Modified $conf array IF the "text" property is not blank private

Definition at line 475 of file class.tslib_gifbuilder.php.

References checkFile(), and t3lib_div::makeInstance().

Referenced by make(), and start().

tslib_gifBuilder::extension  ) 
 

Returns the file extension used in the filename

Returns:
string Extension; "jpg" or "gif"/"png" private

Definition at line 637 of file class.tslib_gifbuilder.php.

tslib_gifBuilder::extension  ) 
 

Returns the file extension used in the filename

Returns:
string Extension; "jpg" or "gif"/"png" private

Definition at line 637 of file class.tslib_gifbuilder.php.

Referenced by fileName().

tslib_gifBuilder::fileName pre  ) 
 

Calculates the GIFBUILDER output filename/path based on a serialized, hashed value of this->setup

Parameters:
string Filename prefix, eg. "GB_"
Returns:
string The relative filepath (relative to PATH_site) private

Definition at line 627 of file class.tslib_gifbuilder.php.

References extension().

tslib_gifBuilder::fileName pre  ) 
 

Calculates the GIFBUILDER output filename/path based on a serialized, hashed value of this->setup

Parameters:
string Filename prefix, eg. "GB_"
Returns:
string The relative filepath (relative to PATH_site) private

Definition at line 627 of file class.tslib_gifbuilder.php.

References extension().

Referenced by gifBuild().

tslib_gifBuilder::getResource file,
fileArray
 

Returns an "imgResource" creating an instance of the tslib_cObj class and calling tslib_cObj::getImgResource

Parameters:
string Filename value OR the string "GIFBUILDER", see documentation in TSref for the "datatype" called "imgResource"
array TypoScript properties passed to the function. Either GIFBUILDER properties or imgResource properties, depending on the value of $file (whether that is "GIFBUILDER" or a file reference)
Returns:
array Returns an array with file information if an image was returned. Otherwise false. private
See also:
tslib_cObj::getImgResource() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=315&cHash=63b593a934 http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=282&cHash=831a95115d

Definition at line 601 of file class.tslib_gifbuilder.php.

References t3lib_div::makeInstance().

tslib_gifBuilder::getResource file,
fileArray
 

Returns an "imgResource" creating an instance of the tslib_cObj class and calling tslib_cObj::getImgResource

Parameters:
string Filename value OR the string "GIFBUILDER", see documentation in TSref for the "datatype" called "imgResource"
array TypoScript properties passed to the function. Either GIFBUILDER properties or imgResource properties, depending on the value of $file (whether that is "GIFBUILDER" or a file reference)
Returns:
array Returns an array with file information if an image was returned. Otherwise false. private
See also:
tslib_cObj::getImgResource() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=315&cHash=63b593a934 http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=282&cHash=831a95115d

Definition at line 601 of file class.tslib_gifbuilder.php.

References t3lib_div::makeInstance().

Referenced by start().

tslib_gifBuilder::gifBuild  ) 
 

Initiates the image file generation if ->setup is true and if the file did not exist already. Gets filename from fileName() and if file exists in typo3temp/ dir it will - of course - not be rendered again. Otherwise rendering means calling ->make(), then ->output(), then ->destroy()

Returns:
string The filename for the created GIF/PNG file. The filename will be prefixed "GB_"
See also:
make(), fileName()

Definition at line 296 of file class.tslib_gifbuilder.php.

References t3lib_stdGraphic::createTempSubDir(), t3lib_stdGraphic::destroy(), fileName(), make(), and t3lib_stdGraphic::output().

tslib_gifBuilder::gifBuild  ) 
 

Initiates the image file generation if ->setup is true and if the file did not exist already. Gets filename from fileName() and if file exists in typo3temp/ dir it will - of course - not be rendered again. Otherwise rendering means calling ->make(), then ->output(), then ->destroy()

Returns:
string The filename for the created GIF/PNG file. The filename will be prefixed "GB_"
See also:
make(), fileName()

Definition at line 296 of file class.tslib_gifbuilder.php.

References t3lib_stdGraphic::createTempSubDir(), t3lib_stdGraphic::destroy(), fileName(), make(), and t3lib_stdGraphic::output().

tslib_gifBuilder::make  ) 
 

The actual rendering of the image file. Basically sets the dimensions, the background color, the traverses the array of GIFBUILDER objects and finally setting the transparent color if defined. Creates a GDlib resource in $this->im and works on that Called by gifBuild()

Returns:
void private
See also:
gifBuild() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=378&cHash=3c2ae4a1ab

Definition at line 324 of file class.tslib_gifbuilder.php.

References t3lib_stdGraphic::adjust(), checkTextObj(), t3lib_stdGraphic::convertColor(), t3lib_stdGraphic::copyImageOntoImage(), t3lib_stdGraphic::crop(), t3lib_stdGraphic::makeBox(), t3lib_stdGraphic::makeEffect(), t3lib_stdGraphic::makeEmboss(), t3lib_stdGraphic::makeOutline(), t3lib_stdGraphic::makeShadow(), t3lib_stdGraphic::makeText(), t3lib_stdGraphic::maskImageOntoImage(), t3lib_stdGraphic::scale(), t3lib_stdGraphic::setWorkArea(), and t3lib_TStemplate::sortedKeyList().

tslib_gifBuilder::make  ) 
 

The actual rendering of the image file. Basically sets the dimensions, the background color, the traverses the array of GIFBUILDER objects and finally setting the transparent color if defined. Creates a GDlib resource in $this->im and works on that Called by gifBuild()

Returns:
void private
See also:
gifBuild() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=378&cHash=3c2ae4a1ab

Definition at line 324 of file class.tslib_gifbuilder.php.

References t3lib_stdGraphic::adjust(), checkTextObj(), t3lib_stdGraphic::convertColor(), t3lib_stdGraphic::copyImageOntoImage(), t3lib_stdGraphic::crop(), t3lib_stdGraphic::makeBox(), t3lib_stdGraphic::makeEffect(), t3lib_stdGraphic::makeEmboss(), t3lib_stdGraphic::makeOutline(), t3lib_stdGraphic::makeShadow(), t3lib_stdGraphic::makeText(), t3lib_stdGraphic::maskImageOntoImage(), t3lib_stdGraphic::scale(), t3lib_stdGraphic::setWorkArea(), and t3lib_TStemplate::sortedKeyList().

Referenced by gifBuild().

tslib_gifBuilder::start conf,
data
 

Initialization of the GIFBUILDER objects, in particular TEXT and IMAGE. This includes finding the bounding box, setting dimensions and offset values before the actual rendering is started. Modifies the ->setup, ->objBB internal arrays Should be called after the ->init() function which initializes the parent class functions/variables in general. The class tslib_gmenu also uses gifbuilder and here there is an interesting use since the function findLargestDims() from that class calls the init() and start() functions to find the total dimensions before starting the rendering of the images.

Parameters:
array TypoScript properties for the GIFBUILDER session. Stored internally in the variable ->setup
array The current data record from tslib_cObj. Stored internally in the variable ->data
Returns:
void
See also:
tslib_cObj::getImgResource(), tslib_gmenu::makeGifs(), tslib_gmenu::findLargestDims()

Definition at line 127 of file class.tslib_gifbuilder.php.

References $data, t3lib_stdGraphic::calcBBox(), calcOffset(), checkTextObj(), t3lib_stdGraphic::crop(), t3lib_stdGraphic::fontResize(), getResource(), t3lib_div::intExplode(), t3lib_div::intInRange(), t3lib_div::makeInstance(), t3lib_stdGraphic::setWorkArea(), and t3lib_TStemplate::sortedKeyList().

tslib_gifBuilder::start conf,
data
 

Initialization of the GIFBUILDER objects, in particular TEXT and IMAGE. This includes finding the bounding box, setting dimensions and offset values before the actual rendering is started. Modifies the ->setup, ->objBB internal arrays Should be called after the ->init() function which initializes the parent class functions/variables in general. The class tslib_gmenu also uses gifbuilder and here there is an interesting use since the function findLargestDims() from that class calls the init() and start() functions to find the total dimensions before starting the rendering of the images.

Parameters:
array TypoScript properties for the GIFBUILDER session. Stored internally in the variable ->setup
array The current data record from tslib_cObj. Stored internally in the variable ->data
Returns:
void
See also:
tslib_cObj::getImgResource(), tslib_gmenu::makeGifs(), tslib_gmenu::findLargestDims()

Definition at line 127 of file class.tslib_gifbuilder.php.

References $data, t3lib_stdGraphic::calcBBox(), calcOffset(), checkTextObj(), t3lib_stdGraphic::crop(), t3lib_stdGraphic::fontResize(), getResource(), t3lib_div::intExplode(), t3lib_div::intInRange(), t3lib_div::makeInstance(), t3lib_stdGraphic::setWorkArea(), and t3lib_TStemplate::sortedKeyList().


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


Généré par L'expert TYPO3 avec  doxygen 1.4.6