Skip to content

FiniteTextGroup

The FiniteTextGroup struct stores infomration about how to render a specific string.

typedef struct {
double r;
double g;
double b;
double a;
const char *text;
} FiniteTextGroup;
TypeDescription
double r,g,b,aThe RGBA value of the text.
const char *textThe text.
  1. The RGB values must be double (float) values between 0 and 1. The way to convert the RGB colors to valid doubles is to divide the value by 255. Below is one way to get the correct RGB values.
size_t members = 2;
FiniteTextGroup myGroup[2] = {
{
.r = 216.0/255.0, // 0.847
.g = 90.0/255.0, // 0.352
.b = 71.0/255.0, // 0.278
.a = 1.0,
.text = "Test "
},
{
.r = 6.0/255.0, // 0.023
.g = 190.0/255.0, //0.745
.b = 31.0/255.0, // 0.121
.a = 1.0,
.text = "Subject."
},
}

When using a FiniteTextGroup, you should keep track of the number of items in the array. Additionally, FiniteTextGroups are meant to be stored in an array, as having a single item in a finite text group is both pointless and causes errors.