Developing with the SDK > Using CSS Syntax in the Style Sheet > Customizing General Nodes in the Style Sheet > Controlling the Node's Skin

The following properties control the way colors are used in the shape: fillStyle, fillColor1, fillColor2, fillStart, fillEnd, fillAngle, and fillTexture.

The fillStyle property specifies the type of Paint object used to fill the shape. The possible values are as listed:

fillStyle : "SOLID_COLOR";
images/dump_010.gif
fillStyle : "LINEAR_GRADIENT";
images/fill_001.gif
fillStyle : "RADIAL_GRADIENT";
images/fill_002.gif
fillStyle : "TEXTURE";
images/fill_004.gif

The fillColor1 and fillColor2 properties specify the colors used:

In LINEAR_GRADIENT and RADIAL_GRADIENT modes, the fillStart, fillEnd, and fillAngle properties define the geometry of the gradient. A gradient is defined by two points called P1 and P2. The following figures explain the meaning of the properties.

Figure 3.2 shows the geometry for a linear gradient.

images/grad_003.gif

Figure 3.2 Linear Gradient

Note that the linear gradient is always in "reflect" mode, so the colors go back and forth from fillColor1 to fillColor2 outside the (P1, P2) segment.

Figure 3.3 shows the geometry for a radial gradient.

images/grad_004.gif

Figure 3.3 Radial Gradient

The fillTexture property specifies the URL of an image file to use as a texture in TEXTURE mode.