Graphviz  2.41.20170921.2350
color.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifndef GV_COLOR_H
15 #define GV_COLOR_H
16 
17 /* #include "arith.h" */
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 typedef struct hsvrgbacolor_t {
24  char *name;
25  unsigned char h, s, v;
26  unsigned char r, g, b, a;
28 
29 /* possible representations of color in gvcolor_t */
32 
33 /* gvcolor_t can hold a color spec in a choice or representations */
34 typedef struct color_s {
35  union {
36  double RGBA[4];
37  double HSVA[4];
38  unsigned char rgba[4];
39  unsigned char cmyk[4];
40  int rrggbbaa[4];
41  char *string;
42  int index;
43  } u;
45 } gvcolor_t;
46 
47 #define COLOR_MALLOC_FAIL -1
48 #define COLOR_UNKNOWN 1
49 #define COLOR_OK 0
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 #endif
unsigned char b
Definition: color.h:26
union color_s::@10 u
int index
Definition: color.h:42
Definition: color.h:34
char * name
Definition: color.h:24
double RGBA[4]
Definition: color.h:36
color_type_t type
Definition: color.h:44
int rrggbbaa[4]
Definition: color.h:40
unsigned char s
Definition: color.h:25
struct color_s gvcolor_t
char * string
Definition: color.h:41
unsigned char cmyk[4]
Definition: color.h:39
unsigned char a
Definition: color.h:26
color_type_t
Definition: color.h:30
unsigned char g
Definition: color.h:26
double HSVA[4]
Definition: color.h:37
unsigned char v
Definition: color.h:25
struct hsvrgbacolor_t hsvrgbacolor_t
unsigned char h
Definition: color.h:25
unsigned char rgba[4]
Definition: color.h:38
unsigned char r
Definition: color.h:26