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

void caca_set_feature ( enum caca_feature  feature  ) 

Set a feature.

This function sets an internal libcaca feature such as the antialiasing or dithering modes. If a specific feature such as CACA_DITHERING_RANDOM, caca_set_feature() will set it immediately. If a generic feature is given instead, such as CACA_DITHERING, the default value will be used instead.

Parameters:
feature The requested feature.

Definition at line 303 of file caca.c.

References CACA_ANTIALIASING, CACA_ANTIALIASING_NONE, CACA_ANTIALIASING_PREFILTER, CACA_BACKGROUND, CACA_BACKGROUND_BLACK, CACA_BACKGROUND_SOLID, CACA_DITHERING, CACA_DITHERING_NONE, CACA_DITHERING_ORDERED2, CACA_DITHERING_ORDERED4, CACA_DITHERING_ORDERED8, CACA_DITHERING_RANDOM, and CACA_FEATURE_UNKNOWN.

{
    switch(feature)
    {
        case CACA_BACKGROUND:
            feature = CACA_BACKGROUND_SOLID;
        case CACA_BACKGROUND_BLACK:
        case CACA_BACKGROUND_SOLID:
            _caca_background = feature;
            break;

        case CACA_ANTIALIASING:
            feature = CACA_ANTIALIASING_PREFILTER;
        case CACA_ANTIALIASING_NONE:
        case CACA_ANTIALIASING_PREFILTER:
            _caca_antialiasing = feature;
            break;

        case CACA_DITHERING:
            feature = CACA_DITHERING_ORDERED4;
        case CACA_DITHERING_NONE:
        case CACA_DITHERING_ORDERED2:
        case CACA_DITHERING_ORDERED4:
        case CACA_DITHERING_ORDERED8:
        case CACA_DITHERING_RANDOM:
            _caca_dithering = feature;
            break;

        case CACA_FEATURE_UNKNOWN:
            break;
    }
}


Generated by  Doxygen 1.6.0   Back to index