|
Freeciv-3.4
|
Go to the source code of this file.
Data Structures | |
| struct | rgbcolor |
Functions | |
| struct rgbcolor * | rgbcolor_new (int r, int g, int b) |
| struct rgbcolor * | rgbcolor_copy (const struct rgbcolor *prgbcolor) fc__attribute((nonnull(1))) |
| bool | rgbcolors_are_equal (const struct rgbcolor *c1, const struct rgbcolor *c2) fc__attribute((nonnull(1 |
| bool void | rgbcolor_destroy (struct rgbcolor *prgbcolor) |
| bool | rgbcolor_load (struct section_file *file, struct rgbcolor **prgbcolor, char *path,...) fc__attribute((__format__(__printf__ |
| bool | fc__attribute ((nonnull(1))) |
| void | rgbcolor_save (struct section_file *file, const struct rgbcolor *prgbcolor, char *path,...) fc__attribute((__format__(__printf__ |
| void | fc__attribute ((nonnull(1, 2))) |
| bool | rgbcolor_to_hex (const struct rgbcolor *prgbcolor, char *hex, size_t hex_len) fc__attribute((nonnull(1))) |
| bool | rgbcolor_from_hex (struct rgbcolor **prgbcolor, const char *hex) fc__attribute((nonnull(1 |
| bool int | rgbcolor_brightness_score (struct rgbcolor *prgbcolor) |
| #define CHECK_RGBCOLOR | ( | _str, | |
| _c, | |||
| _colorname | |||
| ) |
Definition at line 49 of file rgbcolor.h.
Definition at line 59 of file rgbcolor.h.
| #define rgbcolor_list_iterate | ( | rgbcolorlist, | |
| prgbcolor | |||
| ) | TYPED_LIST_ITERATE(struct rgbcolor, rgbcolorlist, prgbcolor) |
Definition at line 43 of file rgbcolor.h.
| #define rgbcolor_list_iterate_end LIST_ITERATE_END |
Definition at line 45 of file rgbcolor.h.
Definition at line 39 of file rgbcolor.h.
Definition at line 40 of file rgbcolor.h.
Return a number indicating the perceptual brightness of this color relative to others (larger is brighter).
Definition at line 186 of file rgbcolor.c.
Referenced by color_brightness_score().
Allocate new rgbcolor structure and make it copy of one given as input. Return new one.
Definition at line 51 of file rgbcolor.c.
Referenced by player_set_color().
Free rgbcolor structure.
Definition at line 70 of file rgbcolor.c.
Referenced by color_brightness_score(), color_system_free(), game_ruleset_free(), handle_player_info(), nation_free(), player_destroy(), player_set_color(), playercolor_command(), playercolor_free(), server_player_set_color(), sg_load_players_basic(), sg_load_players_basic(), and terrains_free().
Allocate new rgbcolor structure.
Definition at line 34 of file rgbcolor.c.
Referenced by color_brightness_score(), color_system_read(), handle_player_info(), handle_ruleset_game(), handle_ruleset_terrain(), rgbcolor_copy(), rgbcolor_from_hex(), and rgbcolor_load().
| void rgbcolor_save | ( | struct section_file * | file, |
| const struct rgbcolor * | prgbcolor, | ||
| char * | path, | ||
| ... | |||
| ) |
Convert a rgb color to a hex string (like 0xff0000 for red [255, 0, 0]).
Definition at line 134 of file rgbcolor.c.
Referenced by player_color_ftstr().