Freeciv-3.3
Loading...
Searching...
No Matches
Functions
colors.cpp File Reference
#include "mem.h"
#include "rgbcolor.h"
#include "qtg_cxxside.h"
#include "colors.h"

Go to the source code of this file.

Functions

struct colorqtg_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 54 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 33 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 45 of file colors.cpp.

Referenced by setup_gui_funcs().