FsColor

The FsColor structure represents a typical color through its Red, Green, Blue and Alpha components.

 

Syntax
struct FsColor {
    union {
        float rgba[4];
        struct {
            float r, g, b, a;
        };
    };
};

 

Members
Member Description
rgba An array of 4 floats that can be used to define the color components (r, g, b, and a) of the struct. Each component is defined as a value between 0 and 1.

 

 

Remarks

The individual components can be accessed through the r, g, b and a fields. For example to create the struct required to set a colour using fsMapViewSetBackgroundColor you would have something like this:

FsColor backColor = { 1.f, 0.2f, 0.75f, 1.f };
fsMapViewSetBackgroundColor(ctx, mapViewId, backColor);

 

 

See Also