AG_BlendFn type specifies an arithmetic operation to use when blending two pixels. The
incoming pixel is referred to as the "source" pixel. The target pixel already
in the frame buffer is referred to as the "destination" pixel.
AG_BlendFn is defined as:
The blending functions differ in how the weight of the destination pixel (versus the weight of the source pixel) is selected.
AG_PIXEL_SRC uses the alpha component of the source pixel (sA). This function is what one would normally use to implement transparency.
AG_PIXEL_DST uses the alpha component of the destination pixel (dA),
AG_PIXEL_OVERLAY uses the sum of the source and alpha components, clamped to 255. Note that this function may be slower than the others depending on the graphics driver in use.
AG_PIXEL_ONE_MINUS_SRC and AG_PIXEL_ONE_MINUS_DST use the value 1 minus the source and destination alpha component.
|AG_Intro(3), AG_Widget(3), AG_Window(3), glBlendFunc(3)|
|The AG_BlendFn type first appeared in Agar 1.3.|