NAME

cxGeoPlotColorSet - set an attribute of the current plot using a color

C SPECIFICATION

#include <cx/Geometry.h>

enum cxGeoPlotSetting
{
 CX_GEO_PLOT_AXIS_COLOR,
 CX_GEO_PLOT_GRID_COLOR,
 CX_GEO_PLOT_GRID_PATTERN,
 CX_GEO_PLOT_GRID_LINE_WIDTH,
 CX_GEO_PLOT_AXIS_LINE_WIDTH,
 CX_GEO_PLOT_XAXIS_LABEL,
 CX_GEO_PLOT_YAXIS_LABEL,
 CX_GEO_PLOT_XMARGIN,
 CX_GEO_PLOT_YMARGIN,
 CX_GEO_PLOT_XMIN,
 CX_GEO_PLOT_XMAX,
 CX_GEO_PLOT_YMIN,
 CX_GEO_PLOT_YMAX,
 CX_GEO_PLOT_XGRID_VISIBLE,
 CX_GEO_PLOT_YGRID_VISIBLE,
 CX_GEO_PLOT_XAXIS_TYPE,
 CX_GEO_PLOT_YAXIS_TYPE,
 CX_GEO_PLOT_XAXIS_ARROW,
 CX_GEO_PLOT_YAXIS_ARROW,
 CX_GEO_PLOT_XAXIS_INVERSE_TICKS,
 CX_GEO_PLOT_YAXIS_INVERSE_TICKS,
 CX_GEO_PLOT_XAXIS_LABEL_CENTRE,
 CX_GEO_PLOT_YAXIS_LABEL_CENTRE,
 CX_GEO_PLOT_XAXIS_SCALE,
 CX_GEO_PLOT_YAXIS_SCALE,
 CX_GEO_PLOT_LEGEND_BORDER_COLOR,
 CX_GEO_PLOT_LEGEND_BACK_COLOR,
 CX_GEO_PLOT_LEGEND_TEXT_COLOR,
};

cxErrorCode cxGeoPlotColorSet (cxGeoPlotSetting type, float* color)

PARAMETERS

type
The attribute of the current plot to be set.
color
An array of three floating point numbers (interpreted as RGB values) to be used to set the attribute.

FUNCTION RETURN VALUE

cxGeoPlotColorSet returns a pointer to an error code. This is an enumerated integer with cx_err_none (zero) indicating success. Any other value indicates an improper input (see below) or the absence of a prior call to cxGeoPlotBegin (3E). A description of the error can be obtained by immediately calling cxGeoPlotGetLastError (3E).

DESCRIPTION

This function sets an attribute of the current plot using an array of three floating-point values, which are interpreted as red, green and blue values. Each value may be between 0.0 (no color) and 1.0 (maximum color). Meaningful results will only be obtained for those attributes that require color. These are:

CX_GEO_PLOT_AXIS_COLOR

- color of axes

CX_GEO_PLOT_GRID_COLOR

- color of grid

CX_GEO_PLOT_LEGEND_BORDER_COLOR

- color of border of legend

CX_GEO_PLOT_LEGEND_BACK_COLOR

- color of background of legend

CX_GEO_PLOT_LEGEND_TEXT_COLOR

- color of legend text

 

By default, the legend background color is grey (0.3, 0.3, 0.3), while each of the other colors are white (1.0, 1.0, 1.0).

SEE ALSO

cxGeoPlotBegin (3E), cxGeoPlotGetLastError (3E)

The source of the LineGraph module may be found at $EXPLORERHOME/src/LineGraph/linegraph.c (UNIX) and %EXPLORERHOME%\src\LineGraph\linegraph.c (NT). It illustrates the use of many of the cxGeoPlot* routines.


Last modified: Aug 04 14:31 1999
[
Documentation Home ]

© The Numerical Algorithms Group Ltd, Oxford UK. 1999