Logo Search packages:      
Sourcecode: libcaca version File versions  Download package

char const* caca_get_feature_name ( enum caca_feature  feature  ) 

Translate a feature value into the feature's name.

This function translates a caca_feature enum into a human-readable description string of the associated feature.

Parameters:
feature The feature value.
Returns:
A static string containing the feature's name.

Definition at line 344 of file caca.c.

References CACA_ANTIALIASING_NONE, CACA_ANTIALIASING_PREFILTER, CACA_BACKGROUND_BLACK, CACA_BACKGROUND_SOLID, CACA_DITHERING_NONE, CACA_DITHERING_ORDERED2, CACA_DITHERING_ORDERED4, CACA_DITHERING_ORDERED8, and CACA_DITHERING_RANDOM.

{
    switch(feature)
    {
        case CACA_BACKGROUND_BLACK: return "black background";
        case CACA_BACKGROUND_SOLID: return "solid background";

        case CACA_ANTIALIASING_NONE:      return "no antialiasing";
        case CACA_ANTIALIASING_PREFILTER: return "prefilter antialiasing";

        case CACA_DITHERING_NONE:     return "no dithering";
        case CACA_DITHERING_ORDERED2: return "2x2 ordered dithering";
        case CACA_DITHERING_ORDERED4: return "4x4 ordered dithering";
        case CACA_DITHERING_ORDERED8: return "8x8 ordered dithering";
        case CACA_DITHERING_RANDOM:   return "random dithering";

        default: return "unknown";
    }
}


Generated by  Doxygen 1.6.0   Back to index