A style bean that sets the color used to draw or fill any of its descendant nodes.
| XML Element | XML Type | Java Class |
| style | RGBAColor | uk.ac.ic.doc.scenebeans.RGBAColor |
| Name | Type | Default Value | Getter Method | Setter Method | Description |
| color | java.awt. Color | black |
getColor
|
setColor
|
The color used to draw or fill any descendant nodes.
When set from an XML document, the textual value of the property is parsed as a string of either 6 or 8 digits. The first pair of digits give the red component of the colour, the second pair the green component, the third pair the blue component and the fourth pair, if given, the alpha (opacity) component. |
| red | double | 0.0 |
getRed
|
setRed
|
The red component of the colour. |
| green | double | 0.0 |
getGreen
|
setGreen
|
The green component of the colour. |
| blue | double | 0.0 |
getBlue
|
setBlue
|
The blue component of the colour. |
| alpha | double | 0.0 |
getAlpha
|
setAlpha
|
The alpha (opacity) component of the colour. A value of 1.0 is completely opaque, while a value of 0.0 is completely transparent. |
<style type="font">
<param name="color" value="#ff000088"/>
<primitive type="text">
<param name="text" value="This is drawn in semitransparent red"/>
</primitive>
</style>