Graphviz
13.0.0~dev.20241220.2304
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 v1.0
7
* which accompanies this distribution, and is available at
8
* https://www.eclipse.org/legal/epl-v10.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
{
HSVA_DOUBLE
,
RGBA_BYTE
,
RGBA_WORD
,
27
RGBA_DOUBLE
,
COLOR_STRING
,
COLOR_INDEX
}
color_type_t
;
28
29
/* gvcolor_t can hold a color spec in a choice or representations */
30
typedef
struct
color_s
{
31
union
{
32
double
RGBA
[4];
33
double
HSVA
[4];
34
unsigned
char
rgba
[4];
35
int
rrggbbaa
[4];
36
char
*
string
;
37
int
index
;
38
}
u
;
39
color_type_t
type
;
40
}
gvcolor_t
;
41
42
#define COLOR_MALLOC_FAIL -1
43
#define COLOR_UNKNOWN 1
44
#define COLOR_OK 0
45
46
#ifdef __cplusplus
47
}
48
#endif
color_type_t
color_type_t
Definition
color.h:26
HSVA_DOUBLE
@ HSVA_DOUBLE
Definition
color.h:26
RGBA_DOUBLE
@ RGBA_DOUBLE
Definition
color.h:27
RGBA_WORD
@ RGBA_WORD
Definition
color.h:26
RGBA_BYTE
@ RGBA_BYTE
Definition
color.h:26
COLOR_INDEX
@ COLOR_INDEX
Definition
color.h:27
COLOR_STRING
@ COLOR_STRING
Definition
color.h:27
gvcolor_t
struct color_s gvcolor_t
color_s
Definition
color.h:30
color_s::index
int index
Definition
color.h:37
color_s::string
char * string
Definition
color.h:36
color_s::RGBA
double RGBA[4]
Definition
color.h:32
color_s::rrggbbaa
int rrggbbaa[4]
Definition
color.h:35
color_s::HSVA
double HSVA[4]
Definition
color.h:33
color_s::u
union color_s::@71 u
color_s::rgba
unsigned char rgba[4]
Definition
color.h:34
color_s::type
color_type_t type
Definition
color.h:39
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