CANVAS_GET_COLOUR(3)

FUNCTION
canvas_get_colour - Get (possibly allocating) a colourcell for a canvas.

SYNOPSIS
#include <karma_canvas.h>

flag canvas_get_colour

(KWorldCanvas canvas, CONST char *colourname, unsigned long *pixel_value, unsigned short *red, unsigned short *green, unsigned short *blue)

DESCRIPTION
Get (possibly allocating) a colourcell for a canvas.

canvas
    The world canvas object.

colourname
    The name of the colour to get.

pixel_value
    The pixel value will be written here.

red The red intensity in the hardware colourmap for the pixel will be written here. If this is NULL, nothing is written here.

green
    The green intensity in the hardware colourmap for the pixel will be written here. If this is NULL, nothing is written here.

blue
    The blue intensity in the hardware colourmap for the pixel will be written here. If this is NULL, nothing is written here.

RETURN VALUE
TRUE if the colourcell was allocated, else FALSE.

Multi-threading Level
Unsafe.

NOTE
The pixel value is valid ONLY for the underlying pixel canvas. ALSO: the pixel value becomes invalid EVERY time the underlying pixel canvas is refreshed/ resized. If the pixel canvas is refreshed/ resized, this routine MUST be called again.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/