If I put an image with has a transparent background on a field, then the backgroundcolor of the field shows through properly. And if I change the backgroundcolor of the field, then the new backgroundcolor shows through. This also works correctly if I use the "set imagesource" command to replace a character with an image. The field's backgroundcolor shows through the transparent background of the image which has been inserted for a specific character using the "set imagesource" command.
But if I change the backgroundcolor of the character which has been replaced by the transparent image, the new backgroundcolor does not come through the transparent areas of the image; it remains the color of the field's backgroundcolor rather than the character's backgroundcolor.
Code: Select all
put "12345" into fld "Field"
set the backgroundcolor of fld "FIeld" to "yellow"
So now I have the text "12345" with a yellow background
Code: Select all
set the imagesource of char 3 of fld "Field" to 1111
Now I see the text "12" followed by image 1111 followed by the text "45" in the field. The yellow field backgroundcolor comes through the transparent areas of image 1111.
Code: Select all
set the backgroundcolor of char 1 to -1 of fld "Field" to "red"
Now the background of the text "12" and "45" is red, but the background of image 1111 is still yellow, the field's backgroundcolor, rather than the character's backgroundcolor.
This also happens if you set the backgroundcolor at the character level first and then set the imagesource. The color which shows through the image's transparent areas is the field's backgroundcolor, not the character's.
Livecode correctly sees the character's backgroundcolor is "red".
Code: Select all
put the backgroundcolor of char 3 of fld "field"
returns "255,0,0" (red). But that's not what you see through the transparent areas of the image in that character's place. You see yellow.
Any ideas how to get a transparent image to show the character's backgroundcolor if it is set rather than the field's backgroundcolor?