GETCOL
                                     ======

                   Get the native colour of INK, STRIP, or PAPER
                   ---------------------------------------------

Its sometimes useful to be able to find the current ink, strip or paper
colour of a given scr/con channel.

Note: The colours returned by GETCOL% are only the plain, basic colours.
Dealing with stripes and stipples is a different matter, not dealt with
here.


Usage
-----

         colour_native% = GETCOL%([#channel_no;] key%)      default #1

Where key%
        -1 => paper
         0 => strip
         1 => ink


Remember that in GD2 the colour code returned represents the NATIVE
colour. Ie to use the colour you need to invoke

        COLOUR_NATVE

and then, if necessary, restore the setting required for other parts of
your program:


Example
-------

Say you want to draw a block in the same colour as your ink (which for
some reason you dont know what it is!):

        COLOUR_QL
        ch = 1
        INK#ch; 1:              REMark Blue (GD2)
        ..
        cn% = GETCOL%(#ch; 1):  REMark Get INK colour
        COLOUR_NATIVE
        BLOCK#ch; 100, 100, 0, 0, cn%
        COLOUR_QL
        ..

See TstCol_bas for a simple example.

For an example of how to get or convert a Wman colour code into a real
colour, see the WMCol_bas routine for ideas..


Software status
---------------

V0.01, pjw, 2015 Feb 26 (separate keywords for paper, strip, ink)
V0.02, pjw, 2019 Apr 06, modularised
V0.03, pjw, 2019 Aug 23, one command, all modes, pickn'mix format
V0.04, pjw, 2019 Oct 14, xtop separated out

               Conditions of use and DISCLAIMER as per Knoware.no

Generated by QuickHTM, 2022 Nov 06