home *** CD-ROM | disk | FTP | other *** search
- %BEGIN Colors
-
- % Copyright (C) 1993 David John Burrowes
- % Distributed under terms of GNU General Public License.
- % See COPYING.text in Convert PICT's CommentedPSCode for a copy
-
- %
- % Notes:
- % `foreground' refers to the pixels turned `on' (e.g. black) when drawing a
- % shape, and background refers to those not turned on (e.g. white).
- % These color routines change the 'global' color values defined in the Common
- % file. Other routines, such as PICTshow and usePattern make use of that data.
- %
-
- %%%%%%%%%%%%%
- % Name: fgColor [000E]
- % Syntax: [red green blue] fgColor -
- % num fgColor -
- % About: Given an array storing the three components of an RGB color,
- % set the foregroundColor variable to this color. If the parameter is
- % not an array, then set the foregroundColor to black (this should never
- % happen, but is provided in case a picture didn't use one of the mac color
- % constants, and you'd want to add PS code to deal)
- %%%%%%%%%%%%%
- /fgColor
- {
- /colorValue exch def
- colorValue type /arraytype eq
- { /foregroundColor colorValue def}
- { /foregroundColor [0 0 0] def }
- ifelse
- } def
-
- %%%%%%%%%%%%%
- % Name: bkColor [000F]
- % Syntax: [red green blue] fgColor -
- % num fgColor -
- % About: Like fgColor, can take an RGB array, or a number representing an
- % unexpected color. If the former, store in backgroundColor, if the latter,
- % ignore, and set backgroundColor to black.
- %%%%%%%%%%%%%
- /bkColor
- {
- /colorValue exch def
- colorValue type /arraytype eq
- { /backgroundColor colorValue def}
- {/backgroundColor [0 0 0] def }
- ifelse
- } def
-
- %%%%%%%%%%%%%
- % Name: RGBFgColor [001A]
- % Syntax: [red green blue] RGBFgColor -
- % About: This takes an array of three number that make up an rgb color value.
- % This color value is then stored as the foreground color.
- %%%%%%%%%%%%%
- /RGBFgCol
- { /foregroundColor exch def }
- def
-
- %%%%%%%%%%%%%
- % Name: RGBBkCol [001B]
- % Syntax: [red green blue] RGBBkCol -
- % About: This takes an array of three number that make up an rgb color value.
- % This color value is then stored as the background color.
- %%%%%%%%%%%%%
- /RGBBkCol
- { /backgroundColor exch def }
- def
-
- %%%%%%%%%%%%%
- % Name: hiliteColor [001D]
- % Syntax: [red green blue] hiliteColor -
- % About: The highlight drawing mode in PICT 2 images appears to allow shape(s)
- % to be drawn with a highlight color. I'm uncertain of the behavior, and thus
- % am ignoring it for now.
- %%%%%%%%%%%%%
- /hiliteColor
- { pop }
- def
-
- %%%%%%%%%%%%%
- % Name: defHilite [001E]
- % Syntax: - defHilite -
- % About: Inside Mac V, p. 103, implies that this resets the highlight color
- % (see above) with a default value. This is ignored.
- %%%%%%%%%%%%%
- /defHilite
- {}
- def
-
- %%%%%%%%%%%%%
- % Name: OpColor [001F]
- % Syntax: [red green blue] OpColor -
- % About: This sets a color that is used by some PICT2 drawing modes (e.g. blend)
- % Those modes are not implemented, and so this is ignored.
- %%%%%%%%%%%%%
- /OpColor
- { pop }
- def
-
- %END Colors
-