File: colorscheme.h

package info (click to toggle)
ggobi 2.1.9~20091212-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 19,340 kB
  • ctags: 5,083
  • sloc: ansic: 57,242; xml: 30,604; cpp: 833; makefile: 355; java: 225; perl: 201; sh: 122; python: 23
file content (62 lines) | stat: -rw-r--r-- 2,060 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* colorscheme.h */
/*
 * ggobi
 * Copyright (C) AT&T, Duncan Temple Lang, Dianne Cook 1999-2005
 *
 * ggobi is free software; you may use, redistribute, and/or modify it
 * under the terms of the Common Public License, which is distributed
 * with the source code and displayed on the ggobi web site, 
 * www.ggobi.org.  For more information, contact the authors:
 *
 *   Deborah F. Swayne   dfs@research.att.com
 *   Di Cook             dicook@iastate.edu
 *   Duncan Temple Lang  duncan@wald.ucdavis.edu
 *   Andreas Buja        andreas.buja@wharton.upenn.edu
*/

#ifndef GGOBI_COLOR_SCHEME_H
#define GGOBI_COLOR_SCHEME_H

#include <gdk/gdk.h>

typedef enum { diverging, sequential, spectral, qualitative,
  UNKNOWN_COLOR_TYPE
} colorscaletype;
typedef enum { rgb, hsv, cmy, cmyk, UNKNOWN_COLOR_SYSTEM } colorsystem;

typedef struct {
  gchar *name;
  gchar *description;
  colorscaletype type;
  colorsystem system;   /*-- system used in the xml description --*/
  gint criticalvalue;   /*-- if diverging, where's the center? --*/

  gint n;               /*-- n <= MAXNCOLORS --*/
  gfloat **data;        /*-- the data in the colortable, in its
                             original system and dimensions --*/
  GdkColor *rgb;         /*-- the data converted to rgb, of length n --*/
  GArray *colorNames;   /*-- in case we have them --*/

  gfloat *bg;           /*-- high-contrast background color, rgb --*/
  GdkColor rgb_bg;     /*-- high-contrast background color, rgb --*/

  GdkColor rgb_hidden;  /*-- for hidden points and edges, close to bg --*/

  gfloat *accent;       /*-- high-contrast accent color, rgb --*/
  GdkColor rgb_accent; /*-- high-contrast accent color, rgb --*/
} colorschemed;

colorschemed *findColorSchemeByName(GList * schemes, const gchar * name);

gint getColor(xmlNodePtr node, xmlDocPtr doc, gfloat ** original,
              GdkColor * col);

colorschemed *read_colorscheme(char *fileName, GList **);
#ifdef __cplusplus
extern "C" {
#endif
void colorscheme_init(colorschemed * scheme);
#ifdef __cplusplus
}
#endif
#endif