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
16extern "C" {
17#endif
18
19typedef struct hsvrgbacolor_t {
20 char *name;
21 unsigned char h, s, v;
22 unsigned char r, g, b, a;
24
25/* possible representations of color in gvcolor_t */
28
29/* gvcolor_t can hold a color spec in a choice or representations */
30typedef 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;
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
Definition color.h:26
@ HSVA_DOUBLE
Definition color.h:26
@ RGBA_DOUBLE
Definition color.h:27
@ RGBA_WORD
Definition color.h:26
@ RGBA_BYTE
Definition color.h:26
@ COLOR_INDEX
Definition color.h:27
@ COLOR_STRING
Definition color.h:27
struct color_s gvcolor_t
int index
Definition color.h:37
char * string
Definition color.h:36
double RGBA[4]
Definition color.h:32
int rrggbbaa[4]
Definition color.h:35
double HSVA[4]
Definition color.h:33
union color_s::@71 u
unsigned char rgba[4]
Definition color.h:34
color_type_t type
Definition color.h:39
unsigned char h
Definition color.h:21
unsigned char a
Definition color.h:22
unsigned char b
Definition color.h:22
unsigned char g
Definition color.h:22
unsigned char s
Definition color.h:21
unsigned char v
Definition color.h:21
unsigned char r
Definition color.h:22
char * name
Definition color.h:20