[TYPO3] mask
Bas van der Togt
b.vandertogt at profinit.com
Mon Mar 26 20:46:55 CEST 2007
Miroslav,
Thanks for your reply again!
80 = TEXT did not help.
Do you know why?
My code now:
# Mask
tt_content.image.20.1.file >
tt_content.image.20.1.file {
import.current = 1
width.field = imagewidth
m.mask = GIFBUILDER
m.mask {
# Here we create a dynamic mask with the exact same
# dimensions as the actual image, but with rounded corners
XY = [10.w],[10.h]
format = gif
# Since the "XY" parameter doesn't have stdWrap, we "find"
# the size by simply loading the original image again.
10 = IMAGE
10.file {
import.current = 1
width.field = imagewidth
maxW = {$styles.content.imgtext.maxW}
maxW.override.data = register:maxImageWidth
maxWInText = {$styles.content.imgtext.maxWInText}
maxWInText.override.data = register:maxImageWidthInText
}
# Create a white box that fills the entire area
20 = BOX
20.dimensions = 0,0,[10.w],[10.h]
20.color = #FFFFFF
# Add Top-Left corner mask
30 = IMAGE
30.file = {$imagePath}cornermask_tl.gif
30.align = l,t
# Add Top-Right corner mask
40 = IMAGE
40.file = {$imagePath}cornermask_tr.gif
40.align = r,t
# Add Bottom-Left corner mask
50 = IMAGE
50.file = {$imagePath}cornermask_bl.gif
50.align = l,b
# Add Bottom-Left corner mask
60 = IMAGE
60.file = {$imagePath}cornermask_br.gif
60.align = r,b
70 = BOX
70.dimensions = 0,60,190,20
70.color = green
80 = TEXT
80.text.cObject < tt_content.image.20.1.altText
80.offset = 15,75
}
# The fastest method (recommended) is using a static image, like this:
#m.bgImg = {$imagePath}clear.gif
# But it can also be done dynamically, like this:
m.bgImg = GIFBUILDER
m.bgImg {
# Here we create a dynamic bgMask
# Dimensions of this image is unimportant
XY = [10.w],[10.h]
format = gif
10 = BOX
10.dimensions = 0,0,10,10
10.color = {$bgColor}
}
}
cheers,
Bas
Miroslav Monkevic schreef:
> Hi,
>
> Bas van der Togt wrote:
>> Thank you very much for your help!
>>
>> - Typoscript
>>
>> tt_content.image.20.1.file >
>> tt_content.image.20.1.file {
>>
> <snip />
>
>> # But it can also be done dynamically, like this:
>> 10.dimensions = 0,0,10,10
>> 10.color = {$bgColor}
>> }
>> }
>>
>> - Typo3 Version 4.0.4
>> - alt and title field is set
>>
>>
> you missed 80 = TEXT line.
>
>> Can you also tell me why i get a white transparent white box. However
>> i set:
>> 70 = BOX
>> 70.dimensions = 0,60,190,20
>> 70.color = green
>>
>>
>
> Because it is just a _mask_ (black hides, white shows).
>
> You have to figure it out yourself. Check these:
>
> http://typo3.org/documentation/document-library/core-documentation/doc_core_tsbyex/0.0.16/view/6/1/
>
> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.0.0/view/5/2/
>
> http://wiki.typo3.org/index.php/GIFBUILDER
>>
>
>> cheers,
>> Bas
>>
>> Miroslav Monkevic schreef:
>>
>>> * Post full changed TS code, please.
>>> * What version of TYPO3 are you using, what compatibility version
>>> value is set?
>>> * Is alt/title field actually not empty?
>>>
>>>
>>>
>>>
>
More information about the TYPO3-english
mailing list