GINO Graphics Suite - GINO v9.0  

gSetColourInfo

Syntax

[C/C++:]
void gSetColourInfo(int ndc, int ndt);
[F90:]
subroutine gSetColourInfo(ndc, ndt)
integer, intent(in) :: ndc,ndt

Arguments

ndc
Number of colours that can be separately defined or selected

= 0, Monochrome device
= 1, Monochrome device with background erase
> 1, Colour/greyscale device

ndt
Display type, identifying the colour/greyscale capabilities of the device

= 0, No colour/greyscale variation (i.e. Monochrome)
= +1,-1 Fixed colour/greyscale
= +2,-2 Static colour/greyscale
= +3,-3 Dynamic colour/greyscale
= +4,-4 Direct colour/greyscale
N.B. Positive values indicate colour display, negative values indicate greyscale.

Description

The routine gSetColourInfo() can be used to restrict the colour settings of the currently nominated device. ndc and ndt define the number of colours and the colour type of the device and these may be set to less than or equal to those defined by the device driver at device initialisation. The maximum colour settings may be enquired through the routine gEnqDeviceState() and the current settings may be enquired through the routine gEnqColourInfo().

ndc defines the number of colours/greyscales that can be defined and selected (see gDefineRGB() & gSetLineColour()). If ndc is set to zero, the device cannot display any colours. ndt defines the colour/greyscale capabilities of the device as follows:

ndt= 0

No colours or greyscales are available.

ndt= +1,-1

The device has a fixed colour palette which cannot be redefined, gDefineRGB() has no effect.

ndt= +2,-2

The device has a static colour palette. gDefineRGB() can be used to redefine colours but colours already drawn on the device will not be affected.

ndt= +3,-3

The device has a dynamic colour palette, gDefineRGB() can be used and redefining a colour that has already been used will have immediate effect on the colour on the screen.

ndt= +4,-4

The device has a true colour capability and will associate an RGB value with each pixel on the device instead of using a look-up table. A pseudo colour table will be maintained by GINO or the device from which RGB values will be extracted where colour indices are used.

Only certain combinations of ndt can be set for any one device, for example if a device has ndt set to 2 it cannot be changed to 3 and vice versa, however most devices can be restricted by setting ndt to 0 or 1 and some can change from 2 to 4 and vice versa.

ndt can also be changed from positive to negative to force GINO to turn all colours into greyscales.

This routine may only be called after a device has been nominated and before the start of the first picture.

See Also

gSetColourInfo Usage
gEnqColourInfo
gEnqDeviceState
gSetLineColour
gDefineRGB