1 /* This file is part of the GNU plotutils package. Copyright (C) 1995, 2 1996, 1997, 1998, 1999, 2000, 2005, 2008, Free Software Foundation, Inc. 3 4 The GNU plotutils package is free software. You may redistribute it 5 and/or modify it under the terms of the GNU General Public License as 6 published by the Free Software foundation; either version 2, or (at your 7 option) any later version. 8 9 The GNU plotutils package is distributed in the hope that it will be 10 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 General Public License for more details. 13 14 You should have received a copy of the GNU General Public License along 15 with the GNU plotutils package; see the file COPYING. If not, write to 16 the Free Software Foundation, Inc., 51 Franklin St., Fifth Floor, 17 Boston, MA 02110-1301, USA. */ 18 19 #include "sys-defines.h" 20 #include "extern.h" 21 22 /* idraw's 12 standard colors, taken from idraw source. These are the only 23 pen colors that idraw understands, so we must quantize. Quantization 24 of fill colors is more complicated; see below. 25 26 The list of 12 standard colors include 6 of the 8 vertices of the RGB 27 cube; Magenta and Cyan are missing. It also includes Orange and Indigo 28 (on the boundary of the cube; they more or less substitute for Magenta 29 and Cyan). Also included are four points in the interior of the cube: 30 Light Gray, Dark Gray, Violet, and Brown. */ 31 32 const plColor _pl_p_idraw_stdcolors[PS_NUM_IDRAW_STD_COLORS] = 33 { 34 {0x0000, 0x0000, 0x0000}, /* Black */ 35 {0xa500, 0x2a00, 0x2a00}, /* Brown */ 36 {0xffff, 0x0000, 0x0000}, /* Red */ 37 {0xffff, 0xa5a5, 0x0000}, /* Orange */ 38 {0xffff, 0xffff, 0x0000}, /* Yellow */ 39 {0x0000, 0xffff, 0x0000}, /* Green */ 40 {0x0000, 0x0000, 0xffff}, /* Blue */ 41 {0xbf00, 0x0000, 0xff00}, /* Indigo */ 42 {0x4f00, 0x2f00, 0x4f00}, /* Violet */ 43 {0xffff, 0xffff, 0xffff}, /* White */ 44 {0xc350, 0xc350, 0xc350}, /* LtGray */ 45 {0x80e8, 0x80e8, 0x80e8} /* DkGray */ 46 }; 47 48 const char * const _pl_p_idraw_stdcolornames[PS_NUM_IDRAW_STD_COLORS] = 49 { 50 "Black", "Brown", "Red", "Orange", "Yellow", "Green", 51 "Blue", "Indigo", "Violet", "White", "LtGray", "DkGray" 52 }; 53 54 /* Idraw allows a fill color to be an interpolation of a pen color 55 (``foreground color'') and a background color; both must be in the above 56 list. The following is a list of the interpolations (``shadings'') that 57 idraw recognizes. 0.0 means use foreground color, 1.0 means use 58 background color. (Idraw shadings are actually a special case of idraw 59 patterns, which include bitmap fillings as well.) */ 60 61 const double _pl_p_idraw_stdshadings[PS_NUM_IDRAW_STD_SHADINGS] = 62 { 63 0.0, 0.25, 0.5, 0.75, 1.0 64 }; 65