The transparentColor attribute specifies that a particular color on a picture should be rendered transparent.
<picture>
or
/ transparentColor = (redexpression, greenexpression, blueexpression)Name | Type | Description |
---|---|---|
red | integer | An integer from 0 to 255 specifying the intensity of the red component. |
green | integer | An integer from 0 to 255 specifying the intensity of the green component. |
blue | integer | An integer from 0 to 255 specifying the intensity of the blue component. |
redexpression | value | An expression resolving to integer from 0 to 255 specifying the intensity of the red component. |
greenexpression | value | An expression resolving to integer from 0 to 255 specifying the intensity of the green component. |
blueexpression | value | An expression resolving to integer from 0 to 255 specifying the intensity of the blue component. |
By default Inquisit will render pictures using without any transparent regions (this includes transparent GIF files). To make regions of an image such as the background transparent, those regions should be set to a single uniform color that does not appear anywhere else in the image, and that color should be specified as the transparent color using this attribute. This attribute can used with any picture format supported by Inquisit (e.g., bmp, jpg, gif), regardless of whether that format natively supports transparency.
The following presents a picture with white regions transparent:
<picture somepicture>
/ items = ("mypicture.bmp")
/ transparentColor = (255, 255, 255)
</picture>
The following presents a picture with black regions transparent:
<picture somepicture>
/ items = ("mypicture.jpg")
/ transparentColor = (0, 0, 0)
</picture>