Graphviz
16.1.2~dev.20261110.1602
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1
3
/*************************************************************************
4
* Copyright (c) 2011 AT&T Intellectual Property
5
* All rights reserved. This program and the accompanying materials
6
* are made available under the terms of the Eclipse Public License v2.0
7
* which accompanies this distribution, and is available at
8
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
9
*
10
* Contributors: Details at https://graphviz.org
11
*************************************************************************/
12
13
#pragma once
14
15
#ifdef __cplusplus
16
extern
"C"
{
17
#endif
18
19
typedef
struct
hsvrgbacolor_t
{
20
char
*
name
;
21
unsigned
char
h
,
s
,
v
;
22
unsigned
char
r
,
g
,
b
,
a
;
23
}
hsvrgbacolor_t
;
24
25
/* possible representations of color in gvcolor_t */
26
typedef
enum
{
27
HSVA_DOUBLE
,
28
RGBA_BYTE
,
29
RGBA_WORD
,
30
RGBA_DOUBLE
,
31
COLOR_STRING
,
32
COLOR_INDEX
33
}
color_type_t
;
34
35
/* gvcolor_t can hold a color spec in a choice or representations */
36
typedef
struct
color_s
{
37
union
{
38
double
RGBA
[4];
39
double
HSVA
[4];
40
unsigned
char
rgba
[4];
41
int
rrggbbaa
[4];
42
char
*
string
;
43
int
index
;
44
}
u
;
45
color_type_t
type
;
46
}
gvcolor_t
;
47
48
#define COLOR_MALLOC_FAIL -1
49
#define COLOR_UNKNOWN 1
50
#define COLOR_OK 0
51
52
#ifdef __cplusplus
53
}
54
#endif
color_type_t
color_type_t
Definition
color.h:26
HSVA_DOUBLE
@ HSVA_DOUBLE
Definition
color.h:27
RGBA_DOUBLE
@ RGBA_DOUBLE
Definition
color.h:30
RGBA_WORD
@ RGBA_WORD
Definition
color.h:29
RGBA_BYTE
@ RGBA_BYTE
Definition
color.h:28
COLOR_INDEX
@ COLOR_INDEX
Definition
color.h:32
COLOR_STRING
@ COLOR_STRING
Definition
color.h:31
gvcolor_t
struct color_s gvcolor_t
color_s
Definition
color.h:36
color_s::index
int index
Definition
color.h:43
color_s::string
char * string
Definition
color.h:42
color_s::RGBA
double RGBA[4]
Definition
color.h:38
color_s::u
union color_s::@40 u
color_s::rrggbbaa
int rrggbbaa[4]
Definition
color.h:41
color_s::HSVA
double HSVA[4]
Definition
color.h:39
color_s::rgba
unsigned char rgba[4]
Definition
color.h:40
color_s::type
color_type_t type
Definition
color.h:45
hsvrgbacolor_t
Definition
color.h:19
hsvrgbacolor_t::h
unsigned char h
Definition
color.h:21
hsvrgbacolor_t::a
unsigned char a
Definition
color.h:22
hsvrgbacolor_t::b
unsigned char b
Definition
color.h:22
hsvrgbacolor_t::g
unsigned char g
Definition
color.h:22
hsvrgbacolor_t::s
unsigned char s
Definition
color.h:21
hsvrgbacolor_t::v
unsigned char v
Definition
color.h:21
hsvrgbacolor_t::r
unsigned char r
Definition
color.h:22
hsvrgbacolor_t::name
char * name
Definition
color.h:20
lib
common
color.h
Generated by
1.9.8