Screen Alpha Mode Types

Types of available alpha modes

Synopsis:

#include <screen/screen.h>
enum {
    SCREEN_NON_PRE_MULTIPLIED_ALPHA = 0,
    SCREEN_PRE_MULTIPLIED_ALPHA = 1
};

Data:

SCREEN_NON_PRE_MULTIPLIED_ALPHA
The non pre-multiplied alpha content.

This is the default. In this case, the source blending is done using the equation:

c(r,g,b) = s(r,g,b) * s(a) + d(r,g,b) * (1 - s(a))

SCREEN_PRE_MULTIPLIED_ALPHA
The pre-multiplied alpha content.

In this case, the source blending is done using the equation:

c(r,g,b) = s(r,g,b) + d(r,g,b) * (1 - s(a))

Library:

libscreen