open-axiom repository from github
/*1Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.2All rights reserved.3Copyright (C) 2007-2010, Gabriel Dos Reis4All rights reserved.56Redistribution and use in source and binary forms, with or without7modification, are permitted provided that the following conditions are8met:910- Redistributions of source code must retain the above copyright11notice, this list of conditions and the following disclaimer.1213- Redistributions in binary form must reproduce the above copyright14notice, this list of conditions and the following disclaimer in15the documentation and/or other materials provided with the16distribution.1718- Neither the name of The Numerical ALgorithms Group Ltd. nor the19names of its contributors may be used to endorse or promote products20derived from this software without specific prior written permission.2122THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS23IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED24TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A25PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER26OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,27EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,28PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR29PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF30LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING31NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS32SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.33*/3435#ifndef OPENAXIOM_SPADCOLORS_included36#define OPENAXIOM_SPADCOLORS_included3738#include <X11/Xlib.h>39#include "rgb.h"4041#define numOfColors 24042#define totalHuesConst 2743#define totalShadesConst 544#define hueEnd 36045#define hueStep 12 /* hueEnd/totalHuesConst */4647#define numPlanes 148#define numColors 1049#define startColor 050#define endColor (startColor+numColors)5152#define colorStep ((maxColors+1)/numColors)5354#define yes 155#define no 05657#define smoothConst 5058#define saymem(a,b,c) saymemWithLine(a,b,c,0)59#define Colorcells 256 /* KF number of elements in permutation vector */60/* #define shade 5 */61#define saturation 0.86263extern RGB HSVtoRGB(HSV );64extern RGB HLStoRGB(HLS );65extern float value(float , float , float );66extern int makeColors(Display * , int , Colormap * , unsigned long * * , int * );67extern int makePermVector(Display * , int , unsigned long * * );68extern int makeNewColorMap(Display * , Colormap , int );69extern unsigned long XPixelColor(int );70extern void FreePixels(Display * , Colormap , int );71extern int AllocCells(Display * , Colormap , int );7273extern int smoothHue;74extern Colormap colorMap;75extern int num;76extern int scrn;7778#define maxColors DisplayCells(dsply,scrn)-17980#endif /* OPENAXIOM_SPADCOLORS_included */818283