cRgb

Overview

Types and Definitions

cRgb

struct cRgb
{
   float red;
   float green;
   float blue;
};
typedef struct cRgb cRgb;

The cRgb struct can store a color from the RGB color space.

Generated

cRgbSlice

struct cRgbSlice
{
   int64_t s;
   cRgb const* v;
};
typedef struct cRgbSlice cRgbSlice;

Via the macro SLICES_C_ generated struct.

cVarRgbSlice

struct cVarRgbSlice
{
   int64_t s;
   cRgb* v;
};
typedef struct cVarRgbSlice cVarRgbSlice;

Via the macro SLICES_C_ generated struct.

Functions

overall

rgb_c_

#define rgb_c_( Red, Green, Blue )

Creates a cRgb instance.

rgb_from_rgb24_c

cRgb24 rgb24_from_rgb_c( cRgb rgb );

Converts a cRgb value to a cRgb32 value.

Example
#include "clingo/color/cRgb.h"
#include "clingo/lang/expect.h"

int main( void )
{
   init_tap_c_();

   expect_c_( false );

   return finish_tap_c_();
}

rgb_from_rgb24_c

cRgb rgb_from_rgb24_c( cRgb24 rgb );

eq_rgb_c

#define eq_rgb_c_( A, B )                                                     \
   eq_rgb_c( (A), (B), FLT_EPSILON )
bool eq_rgb_c( cRgb a, cRgb b, float epsilon );
Example
#include "clingo/color/cRgb.h"
#include "clingo/lang/expect.h"

int main( void )
{
   init_tap_c_();

   expect_c_( false );

   return finish_tap_c_();
}