4 This page describes RGB tripplet to pixels conversions.
6 See also link:basic_types.html#Color[colors].
9 -------------------------------------------------------------------------------
12 #include <core/GP_Convert.h>
14 GP_Pixel GP_RGBToPixel(uint8_t r, uint8_t g, uint8_t b, GP_PixelType type);
16 GP_Pixel GP_RGBAToPixel(uint8_t r, uint8_t g, uint8_t b, uint8_t a,
19 GP_Pixel GP_RGBToContextPixel(uint8_t r, uint8_t g, uint8_t b,
20 const GP_Context *context);
22 GP_Pixel GP_RGBAToContextPixel(uint8_t r, uint8_t g, uint8_t b, uint8_t a,
23 const GP_Context *context);
24 -------------------------------------------------------------------------------
26 Simple functions to convert RGB or RGBA 8 bit values into the specific
27 link:pixels.html[pixel types].
30 -------------------------------------------------------------------------------
33 #include <core/GP_Convert.h>
35 GP_Pixel GP_ConvertPixel(GP_Pixel pixel, GP_PixelType from, GP_PixelType to);
36 -------------------------------------------------------------------------------
38 Converts pixel value. The conversion currently converts by converting the
39 value to RGBA8888 and then to the resulting value.