JMSL Chart Programmer's Guide
2D Drawing Elements >> Fill Area Attributes  Previous Page  Contents  Next Page

Fill Area Attributes

FillOutlineType

FillOutlineType is an integer-value attribute that turns on or off the drawing of an outline around filled areas. Its value should be FILL_TYPE_NONE (for outline off) or FILL_TYPE_SOLID (for outline on). The default is to draw solid lines.

FillOutlineColor

FillOutlineColor is a Color-valued attribute that determines the color used to outline the filled regions. The outline is drawn only if the attribute FillOutlineType has the value FILL_TYPE_SOLID. Its default value is Color.black.

FillType

FillType is an integer-value attribute that turns on or off the drawing of the interior of filled areas. Its value should be

FillColor

FillColor is a Color-valued attribute that determines the color used to fill a region with a solid color. Its default value is Color.black.

Gradient

Gradient is a Color array-valued attribute that fills a region with a gradient color. It does not have a default value.

The value of Gradient should be an array of four colors. These are the colors at the four corners of a square. In order they are: lower-left, lower-right, upper-right and upper-left.

If none of the above patterns exist, then no gradient is drawn.

Vertical
setGradient(Color.yellow, Color.yellow, Color.red, Color.red)
Horizontal
setGradient(Color.yellow, Color.red, Color.red, Color.yellow)
Diagonal
setGradient(Color.yellow, null, Color.red, null)
Diagonal
setGradient(null, Color.yellow, null, Color.red)

FillPaint

FillPaint is a Paint-valued attribute that fills a region with a tiled pattern. It does not have a default value. The class FillPaint contains utilities to define some useful paint patterns.

Some Examples of FillPaint

FillPaint.verticalStripe(10, 5, Color.yellow,Color.blue)
FillPaint.horizontalStripe(10, 5, Color.yellow,Color.blue)
FillPaint.diamond(36, 5, Color.blue,Color.yellow)
FillPaint.checkerboard(24, Color.red,Color.yellow)

The FillPaint attribute can also be set using an Image, which is used to tile filled regions



©  Visual Numerics, Inc.  All rights reserved.  Previous Page  Contents  Next Page