Graphviz
2.41.20171026.1811
Main Page
Data Structures
Files
File List
Globals
lib
common
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
;
27
}
hsvrgbacolor_t
;
28
29
/* possible representations of color in gvcolor_t */
30
typedef
enum
{
HSVA_DOUBLE
,
RGBA_BYTE
,
RGBA_WORD
,
CMYK_BYTE
,
31
RGBA_DOUBLE
,
COLOR_STRING
,
COLOR_INDEX
}
color_type_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
;
44
color_type_t
type
;
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
hsvrgbacolor_t::b
unsigned char b
Definition:
color.h:26
RGBA_BYTE
Definition:
color.h:30
color_s::u
union color_s::@10 u
RGBA_WORD
Definition:
color.h:30
color_s::index
int index
Definition:
color.h:42
color_s
Definition:
color.h:34
hsvrgbacolor_t::name
char * name
Definition:
color.h:24
color_s::RGBA
double RGBA[4]
Definition:
color.h:36
color_s::type
color_type_t type
Definition:
color.h:44
color_s::rrggbbaa
int rrggbbaa[4]
Definition:
color.h:40
hsvrgbacolor_t
Definition:
color.h:23
hsvrgbacolor_t::s
unsigned char s
Definition:
color.h:25
COLOR_STRING
Definition:
color.h:31
gvcolor_t
struct color_s gvcolor_t
color_s::string
char * string
Definition:
color.h:41
color_s::cmyk
unsigned char cmyk[4]
Definition:
color.h:39
hsvrgbacolor_t::a
unsigned char a
Definition:
color.h:26
color_type_t
color_type_t
Definition:
color.h:30
hsvrgbacolor_t::g
unsigned char g
Definition:
color.h:26
color_s::HSVA
double HSVA[4]
Definition:
color.h:37
HSVA_DOUBLE
Definition:
color.h:30
hsvrgbacolor_t::v
unsigned char v
Definition:
color.h:25
CMYK_BYTE
Definition:
color.h:30
hsvrgbacolor_t
struct hsvrgbacolor_t hsvrgbacolor_t
COLOR_INDEX
Definition:
color.h:31
hsvrgbacolor_t::h
unsigned char h
Definition:
color.h:25
color_s::rgba
unsigned char rgba[4]
Definition:
color.h:38
RGBA_DOUBLE
Definition:
color.h:31
hsvrgbacolor_t::r
unsigned char r
Definition:
color.h:26
Generated by
1.8.5