CXXR (C++ R)
Colors.h
1 /*
2  * R : A Computer Language for Statistical Data Analysis
3  * Copyright (C) 1998--2008 R Core Team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, a copy is available at
17  * http://www.r-project.org/Licenses/
18  */
19 
20 #ifndef COLORS_H_
21 #define COLORS_H_
22 
23 /* This is a private header, possibly temporary */
24 
25 #define COLOR_TABLE_SIZE 1024
26 
27 /* always remap private functions */
28 #define isNAcol Rf_isNAcol
29 
30 /* hsv2rgb and rgb2hsv are in Utils.h */
31 
32  /* Miscellaneous (from colors.c) */
33 
34 Rboolean isNAcol(SEXP col, int index, int ncol); /* used in plot[3d].c */
35 
36 
37 #ifdef UNUSED
38 #define char2col Rf_char2col
39 #define CheckColor Rf_CheckColor
40 #define rgb2col Rf_rgb2col
41 #define RGB2rgb Rf_RGB2rgb
42 #define RGBA2rgb Rf_RGBA2rgb
43 #define ScaleColor Rf_ScaleColor
44 unsigned int char2col(const char *); /* rgb2col() or name2col() */
45 unsigned int rgb2col(const char *);
46 unsigned int ScaleColor(double x);
47 unsigned int CheckColor(int x);
48 char *RGB2rgb(unsigned int, unsigned int, unsigned int);
49 char *RGBA2rgb(unsigned int, unsigned int, unsigned int, unsigned int);
50 #endif
51 
52 #endif
53