File: color.h

package info (click to toggle)
wob 0.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 188 kB
  • sloc: ansic: 1,392; xml: 251; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 437 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef _WOB_COLOR_H
#define _WOB_COLOR_H

#include <stdbool.h>
#include <stdint.h>

struct wob_color {
	float a;
	float r;
	float g;
	float b;
};

uint32_t wob_color_to_argb(struct wob_color color);

uint32_t wob_color_to_rgba(struct wob_color color);

struct wob_color wob_color_premultiply_alpha(struct wob_color color);

bool wob_color_from_string(const char *restrict str, char **restrict str_end, struct wob_color *color);

#endif