Documentation TYPO3 par Ameos |
Public Member Functions | |
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 () | |
$combinedTextStrings = array() | |
$combinedFileNames = array() | |
$data = Array() | |
$objBB = Array() | |
$myClassName = 'gifbuilder' | |
$charRangeMap = array() |
Definition at line 102 of file class.tslib_gifbuilder.php.
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.
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 |
Definition at line 129 of file class.tslib_gifbuilder.php.
References $data, t3lib_stdGraphic::calcBBox(), calcOffset(), t3lib_div::callUserFunction(), checkTextObj(), t3lib_stdGraphic::crop(), t3lib_stdGraphic::fontResize(), getResource(), t3lib_div::intExplode(), t3lib_div::intInRange(), t3lib_div::makeInstance(), t3lib_stdGraphic::reduceColors(), t3lib_stdGraphic::setWorkArea(), and t3lib_TStemplate::sortedKeyList().
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()
Definition at line 318 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()
Definition at line 346 of file class.tslib_gifbuilder.php.
References t3lib_stdGraphic::adjust(), checkTextObj(), t3lib_stdGraphic::convertColor(), t3lib_stdGraphic::copyImageOntoImage(), t3lib_stdGraphic::crop(), t3lib_stdGraphic::imagecreate(), 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(), t3lib_TStemplate::sortedKeyList(), and t3lib_stdGraphic::unifyColors().
Referenced by gifBuild().
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.
array | GIFBUILDER object TypoScript properties |
Definition at line 490 of file class.tslib_gifbuilder.php.
References checkFile(), and t3lib_div::makeInstance().
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)
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. |
Definition at line 570 of file class.tslib_gifbuilder.php.
References t3lib_div::splitCalc().
Referenced by start().
tslib_gifBuilder::getResource | ( | $ | file, | |
$ | fileArray | |||
) |
Returns an "imgResource" creating an instance of the tslib_cObj class and calling tslib_cObj::getImgResource
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) |
Definition at line 619 of file class.tslib_gifbuilder.php.
References t3lib_div::inList(), and t3lib_div::makeInstance().
Referenced by start().
tslib_gifBuilder::checkFile | ( | $ | file | ) |
Returns the reference to a "resource" in TypoScript.
string | The resource value. |
Reimplemented from t3lib_stdGraphic.
Definition at line 636 of file class.tslib_gifbuilder.php.
Referenced by checkTextObj().
tslib_gifBuilder::fileName | ( | $ | pre | ) |
Calculates the GIFBUILDER output filename/path based on a serialized, hashed value of this->setup
string | Filename prefix, eg. "GB_" |
Definition at line 647 of file class.tslib_gifbuilder.php.
References t3lib_div::shortMD5().
Referenced by gifBuild().
tslib_gifBuilder::extension | ( | ) |
Returns the file extension used in the filename
Definition at line 663 of file class.tslib_gifbuilder.php.