Loading...
Searching...
No Matches
driver/color.c
Go to the documentation of this file.
#include <grass/colors.h>
#include "driver.h"
#include "driverlib.h"
void COM_Color_RGB(unsigned char r, unsigned char g, unsigned char b)
{
if (driver->Color)
(*driver->Color)(r, g, b);
}
void COM_Standard_color(int number)
{
struct color_rgb rgb;
if (number < 0 || number >= G_num_standard_colors())
return;
rgb = G_standard_color_rgb(number);
COM_Color_RGB(rgb.r, rgb.g, rgb.b);
}
G_num_standard_colors
int G_num_standard_colors(void)
Get number of named colors (RGB triplets).
Definition color_str.c:56
G_standard_color_rgb
struct color_rgb G_standard_color_rgb(int n)
Get RGB triplet of given color.
Definition color_str.c:66
COM_Standard_color
void COM_Standard_color(int number)
Definition driver/color.c:11
COM_Color_RGB
void COM_Color_RGB(unsigned char r, unsigned char g, unsigned char b)
Definition driver/color.c:5
b
double b
Definition driver/set_window.c:5
r
double r
Definition driver/set_window.c:5
driver.h
driverlib.h
g
float g
Definition named_colr.c:7
driver
Definition driver.h:27
driver::Color
void(* Color)(int, int, int)
Definition driver.h:49