comparison toolboxes/graph_visualisation/include/graphviz/color.h @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 /* $Id: color.h,v 1.7 2009/06/03 01:10:51 ellson Exp $ $Revision: 1.7 $ */
2 /* vim:set shiftwidth=4 ts=8: */
3
4 /**********************************************************
5 * This software is part of the graphviz package *
6 * http://www.graphviz.org/ *
7 * *
8 * Copyright (c) 1994-2004 AT&T Corp. *
9 * and is licensed under the *
10 * Common Public License, Version 1.0 *
11 * by AT&T Corp. *
12 * *
13 * Information and Software Systems Research *
14 * AT&T Research, Florham Park NJ *
15 **********************************************************/
16
17 #ifndef GV_COLOR_H
18 #define GV_COLOR_H
19
20 /* #include "arith.h" */
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 typedef struct hsvrgbacolor_t {
27 char *name;
28 unsigned char h, s, v;
29 unsigned char r, g, b, a;
30 } hsvrgbacolor_t;
31
32 /* possible representations of color in gvcolor_t */
33 typedef enum { HSVA_DOUBLE, RGBA_BYTE, RGBA_WORD, CMYK_BYTE,
34 RGBA_DOUBLE, COLOR_STRING, COLOR_INDEX } color_type_t;
35
36 /* gvcolor_t can hold a color spec in a choice or representations */
37 typedef struct color_s {
38 union {
39 double RGBA[4];
40 double HSVA[4];
41 unsigned char rgba[4];
42 unsigned char cmyk[4];
43 int rrggbbaa[4];
44 char *string;
45 int index;
46 } u;
47 color_type_t type;
48 } gvcolor_t;
49
50 #define COLOR_MALLOC_FAIL -1
51 #define COLOR_UNKNOWN 1
52 #define COLOR_OK 0
53
54 #ifdef __cplusplus
55 }
56 #endif
57 #endif