Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/gipsy/sub/GgiPlotColors.dc2
Дата изменения: Thu Mar 14 05:19:26 2002
Дата индексирования: Sat Jan 17 00:31:06 2009
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п
Function: GgiPlotColors

Purpose: Increase number of colours available to plotfield elements.

Category: USER-INTERFACE, GRAPHICS

File: ggi.src

Author: J.P. Terlouw

Use:
#include "ggi.h"
ident plotter;
int requested, obtained;

obtained = GgiPlotColors(plotter, requested);

plotter - the plotfield element or NULL;
requested - the desired number of colors;
obtained - the number of colors that could be obtained.


Description: GgiPlotColors' internal working is different for PseudoColor,
DirectColor and TrueColor visuals. This is transparent to
the calling program.

In PseudoColor and DirectColor, GgiPlotColors() normally
attempts to allocate colors from the standard X colormap.
If this fails or if this has been requested by the user,
a private colormap is created. In TrueColor, an internal
color map is maintained. In the latter case colormap
manipulation is emulated by repainting the window with
the changed palette.

The allocated colors are stored in a master table from which
individual plotfields can use the colors they need. This is
done by calling GgiPlotMapColors(). If the argument 'plotter'
is not NULL, the complete master table is made available
to the specified plotfield. If it is NULL, at least one
plotfield must have been created before, otherwise no colors
can be allocated and zero (0) will be returned.
Initially color indices 0..15 in the master color table have been
assigned a set of standard color representations. Indices
16 and above are initially undefined and must be defined by
calling PGSCR.


Relates doc.: GgiPlotMapColors.dc2

Updates: Jan 14, 1999: JPT, Document created.
Sep 20, 1999: JPT, Implemented individual plotfield mappings.
Mar 12, 2001: JPT, TrueColor support implemented.