Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-qt/colors.cpp File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Functions
colors.cpp File Reference
`#include "mem.h"`
`#include "colors.h"`
`#include "qtg_cxxside.h"`

Go to the source code of this file.

## Functions

struct color * | qtg_color_alloc (int r, int g, int b)
void | qtg_color_free (struct color *pcolor)
int | color_brightness_score (struct color *pcolor)

## Function Documentation

## ◆ color_brightness_score()

int color_brightness_score | ( | struct color * | pcolor | ) |

Return a number indicating the perceptual brightness of this color relative to others (larger is brighter).

Definition at line 50 of file colors.cpp.

## ◆ qtg_color_alloc()

struct color * qtg_color_alloc | ( | int | r,
|  | int | g,
|  | int | b
| ) |  |

Allocate a color (adjusting it for our colormap if necessary on paletted systems) and return a pointer to it.

Definition at line 29 of file colors.cpp.

Referenced by setup_gui_funcs().

## ◆ qtg_color_free()

void qtg_color_free | ( | struct color * | pcolor | ) |

Free a previously allocated color. See qtg_color_alloc.

Definition at line 41 of file colors.cpp.

Referenced by setup_gui_funcs().