Plot.DrawSetBrushColor

Prototypes

void DrawSetBrushColor( int nFillColor <, int nHatchColor> )

void DrawSetBrushColor( int nFillRed, int nFillGreen, int nFillBlue <, int nHatchRed, int nHatchGreen, int nHatchBlue> )

Parameters

int nFillColor
A predefined constant specifying the new fill color for the brush. The valid values are BLACK, BLUE, BROWN, CHARCOAL, CREAM, CYAN, GOLD, GRAY, GREY, GREEN, LILAC, LIME, MAGENTA, MAROON, OLIVE, ORANGE, PINK, PURPLE, RED, ROSE, SALMON, STEEL, TAN, VIOLET, WHITE, and YELLOW.

int nFillRed

int nFillGreen

int nFillBlue
An RGB specification of the desired fill color. Each parameter must be an integer in the range [0, 255]. Examples: the triplet (0, 0, 0) represents black; the triplet (255, 255, 255) represents white.

int nHatchColor
A predefined constant specifying the new hatch color for the brush. The valid values are BLACK, BLUE, BROWN, CHARCOAL, CREAM, CYAN, GOLD, GRAY, GREY, GREEN, LILAC, LIME, MAGENTA, MAROON, OLIVE, ORANGE, PINK, PURPLE, RED, ROSE, SALMON, STEEL, TAN, VIOLET, WHITE, and YELLOW.

int nHatchRed

int nHatchGreen

int nHatchBlue
An RGB specification of the desired hatch color. Each parameter must be an integer in the range [0, 255]. Examples: the triplet (0, 0, 0) represents black; the triplet (255, 255, 255) represents white.

Remarks

This method assigns colors to the brush. There is only one brush and it is shared by all three drawing regions (PLOTBACKGROUND, PLOTFOREGROUND, GRAPHFOREGROUND). The brush is used to fill the interior of closed figures such as arcs, markers, rectangles, and polygons. The outline of a figure is drawn using the current pen characteristics.

The optional hatch parameters enable you to specify the color of the hatch marks that are drawn when the brush's style is something other than BRUSH_SOLID.

If you want to change the fill color but not the hatch color, call this method with two parameters but set nHatchColor=-1. If you want to change the hatch color but not the fill color, call this method with two parameters but set nFillColor=-1.

The default brush fill color is BLACK and the default brush hatch color is the color used by Windows to draw push buttons.

Example
x = { 1 2 3 4 5 6 7 8 };
y = { 2 1 4 5 6 5 6 9 };
declare ScatterPlot plot;
plot = ScatterPlot.Create( "Sample Data", x, y );
plot.DrawUseDataCoordinates();
plot.DrawSetBrushColor( RED ); 
plot.DrawRectangle( 2, 3, 6, 7, true );
See Also

Plot.DrawSetBrushStyle