TYPO3 API  SVNRelease
Public Member Functions | Public Attributes | Protected Member Functions
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)
 extension ()

Public Attributes

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

Protected Member Functions

 calculateValue ($string)
 calculateFunctions ($string)
 calculateMaximum ($string)

Detailed Description

Definition at line 101 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:
stringThe 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 655 of file class.tslib_gifbuilder.php.

References $value, calculateFunctions(), calculateValue(), and t3lib_div\trimExplode().

Referenced by calculateMaximum(), and start().

tslib_gifBuilder::calculateFunctions ( string) [protected]

Calculates special functions: + max([10.h], [20.h]) -> gets the maximum of the given values

Parameters:
string$string,:The raw string with functions to be calculated
Returns:
string The calculated values

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

References calculateMaximum().

Referenced by calcOffset().

tslib_gifBuilder::calculateMaximum ( string) [protected]

Calculates the maximum of a set of values defined like "[10.h],[20.h],1000"

Parameters:
string$string,:The string to be used to calculate the maximum (e.g. "[10.h],[20.h],1000")
Returns:
integer The maxium value of the given comma separated and calculated values

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

References calcOffset(), and t3lib_div\trimExplode().

Referenced by calculateFunctions().

tslib_gifBuilder::calculateValue ( string) [protected]

Calculates the value concerning the dimensions of objects.

Parameters:
string$string,:The string to be calculated (e.g. "[20.h]+13")
Returns:
integer The calculated value (e.g. "23")
See also:
calcOffset()

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

References t3lib_div\splitCalc().

Referenced by calcOffset().

tslib_gifBuilder::checkFile ( file)

Returns the reference to a "resource" in TypoScript.

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

Reimplemented from t3lib_stdGraphic.

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

References $GLOBALS.

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:
arrayGIFBUILDER object TypoScript properties
Returns:
array Modified $conf array IF the "text" property is not blank private

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

References $value, checkFile(), and t3lib_div\makeInstance().

Referenced by make().

tslib_gifBuilder::extension ( )

Returns the file extension used in the filename

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

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

tslib_gifBuilder::getResource ( file,
fileArray 
)

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

Parameters:
stringFilename value OR the string "GIFBUILDER", see documentation in TSref for the "datatype" called "imgResource"
arrayTypoScript 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()

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

References t3lib_div\inList(), and 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 357 of file class.tslib_gifbuilder.php.

References t3lib_stdGraphic\createTempSubDir(), t3lib_stdGraphic\destroy(), 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()

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

References $value, t3lib_stdGraphic\adjust(), checkTextObj(), t3lib_stdGraphic\convertColor(), t3lib_stdGraphic\copyImageOntoImage(), t3lib_stdGraphic\crop(), t3lib_stdGraphic\makeBox(), t3lib_stdGraphic\makeEffect(), t3lib_stdGraphic\makeEllipse(), t3lib_stdGraphic\makeEmboss(), t3lib_stdGraphic\makeOutline(), t3lib_stdGraphic\makeShadow(), t3lib_stdGraphic\makeText(), t3lib_stdGraphic\maskImageOntoImage(), t3lib_stdGraphic\scale(), t3lib_stdGraphic\setWorkArea(), t3lib_TStemplate\sortedKeyList(), and t3lib_stdGraphic\unifyColors().

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:
arrayTypoScript properties for the GIFBUILDER session. Stored internally in the variable ->setup
arrayThe 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 128 of file class.tslib_gifbuilder.php.

References $data, $GLOBALS, t3lib_stdGraphic\calcBBox(), calcOffset(), t3lib_div\callUserFunction(), t3lib_stdGraphic\fontResize(), getResource(), t3lib_div\intExplode(), t3lib_div\intInRange(), t3lib_div\makeInstance(), t3lib_stdGraphic\setWorkArea(), and t3lib_TStemplate\sortedKeyList().


Member Data Documentation

tslib_gifBuilder::$charRangeMap = array()

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

tslib_gifBuilder::$combinedFileNames = array()

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

tslib_gifBuilder::$combinedTextStrings = array()

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

tslib_gifBuilder::$data = Array()

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

Referenced by start().

tslib_gifBuilder::$h = 0

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

tslib_gifBuilder::$im = ''

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

tslib_gifBuilder::$map

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

tslib_gifBuilder::$myClassName = 'gifbuilder'

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

tslib_gifBuilder::$objBB = Array()

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

tslib_gifBuilder::$setup = Array ()

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

tslib_gifBuilder::$w = 0

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

tslib_gifBuilder::$workArea

Reimplemented from t3lib_stdGraphic.

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


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