Documentation Project 1
ContentsIndexHome
PreviousUpNext
sack::image::SetAlpha Macro
C++
#define SetAlpha( rgb, a ) ( ((rgb)&0x00FFFFFF) | ( (a)<<24 ) )

Sets the alpha part of a color. (0-255 value, 0 being transparent, and 255 solid(opaque))

CDATA color = BASE_COLOR_RED;
   
CDATA hazy_color = SetAlpha( color, 128 );
Copyright (c) 2010. All rights reserved.
What do you think about this topic? Send feedback!