I was just browsing through the docs and noticed that there is a note on the
SDL_SetAlpha function.
“Note: This function and the semantics of SDL alpha blending have changed
since version 1.1.4. Up until version 1.1.5, an alpha value of 0 was
considered opaque and a value of 255 was considered transparent. This has
now been inverted: 0 (SDL_ALPHA_TRANSPARENT) is now considered transparent
and 255 (SDL_ALPHA_OPAQUE) is now considered opaque.”
I’m kind of a newbie to graphics programming and I’m probably wrong here,
but for me the “old way” seems much more logical. I think the alpha value
should represent how much transparency is to be used. This way 0 represents
"full transparency" and that just doesn’t computer in my head.
Regards
Rickard Andersson
I was just browsing through the docs and noticed that there is a note on the
SDL_SetAlpha function.
“Note: This function and the semantics of SDL alpha blending have changed
since version 1.1.4. Up until version 1.1.5, an alpha value of 0 was
considered opaque and a value of 255 was considered transparent. This has
now been inverted: 0 (SDL_ALPHA_TRANSPARENT) is now considered transparent
and 255 (SDL_ALPHA_OPAQUE) is now considered opaque.”
I’m kind of a newbie to graphics programming and I’m probably wrong here,
but for me the “old way” seems much more logical. I think the alpha value
should represent how much transparency is to be used. This way 0 represents
"full transparency" and that just doesn’t computer in my head.
Regards
Rickard Andersson
“Rickard Andersson” wrote:
I’m kind of a newbie to graphics programming and I’m probably wrong here,
but for me the “old way” seems much more logical. I think the alpha value
should represent how much transparency is to be used. This way 0 represents
"full transparency" and that just doesn’t computer in my head.
SDL treats alpha as opacity because that is the classic definition used by
the rest of the world. In particular it’s the definition used by Porter and
Duff in their influential paper about alpha compositioning