cf_pixel_premultiply¶
Category: graphics
GitHub: cute_color.h
Returns a premultiplied CF_Pixel by its alpha component.
CF_Pixel cf_pixel_premultiply(CF_Pixel c) { c.colors.r = cf_mul_un8(c.colors.r, c.colors.a); c.colors.g = cf_mul_un8(c.colors.g, c.colors.a); c.colors.b = cf_mul_un8(c.colors.b, c.colors.a); return c; }
| Parameters | Description |
|---|---|
a |
The pixel. |
Remarks¶
Read here for more information about premultiplied alpha.
Related Pages¶
cf_mul_pixel
cf_div_pixel
cf_add_pixel
cf_sub_pixel
cf_pixel_lerp