[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

getmcolor Subroutine

Purpose

Gets a copy of the RGB values for a color map entry.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void getmcolor
(Colorindex index,
Int16 *red, Int16 *green, Int16 *blue)

FORTRAN Syntax

SUBROUTINE GETMCO(index, red, green, blue)
INTEGER*4 index
INTEGER*2 red, green, blue

Description

The getmcolor subroutine gets the red, green, and blue components of a color map entry and copies them to the specified locations. This subroutine returns only the values associated with a slot in the current color table. It does not return, nor does it set, the current drawing color. For the current drawing color, use the getcolor subroutine in color map mode, and the gRGBcolor subroutine in RGB mode.

Note: This subroutine cannot be used to add to a display list.

Parameters

index Specifies the index into the color map.
red Specifies a pointer to the location into which to copy the red value of the color specified by index.
green Specifies a pointer to the location into which to copy the green value of the color specified by index.
blue Specifies a pointer to the location into which to copy the blue value of the color specified by index.

Example

The example C language program overlay.c uses the getmcolor subroutine to save the values in the color map before changing them with the mapcolor subroutine.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Choosing a set of bitplanes for drawing with the drawmode subroutine.

Returning the current color with the getcolor subroutine.

Returning the number of the current color map with the getmap subroutine.

Returning the current RGB color with the gRGBcolor subroutine.

Changing a color map entry to an RGB value with the mapcolor subroutine.

Querying the System.

Working in Color Map and RGB Modes.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]