Note on (+calc)
Whenever the +calc function is added to a value in the data type
of the properties underneath, you can use the dimensions of
TEXT and IMAGE objects from
the
GIFBUILDER object array. This is done by inserting a tag like
this:
[10. or
[10., where 10 is the
GIFBUILDER object number in the array and w/h signifies either
width or height of the object.
The special property
line (for example,
[10.) uses the height a single line of text would take.
On using the special function
max, the maximum of multiple
values can be determined. Example:
XY = [10.w]+[20.w], max([10.h], [20.h])
Here is a full example:
lib.example = IMAGE
lib.example {
file = GIFBUILDER
file {
XY = [10.w]+20, [10.h]+20
backColor = #ff8700
format = png
10 = TEXT
10 {
text = TYPO3 GIFBUILDER Example
fontSize = 20
fontColor = #ffffff
offset = 10,25
}
}
As you see, the image has a width/height defined as the width/height of the text printed onto it + 20 pixels.
The generated image looks like:
The rendered image from the example above