Cobbletext  0.2.0
Complex text layout and rendering engine
Functions
math_.h File Reference
#include <stdint.h>
#include "macros.h"
Include dependency graph for math_.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint32_t cobbletext_math_alpha_blend_over_argb (uint32_t background, uint32_t foreground)
 Composite two ARGB color values using alpha blending and the "over" operator. More...
 
uint32_t cobbletext_math_gamma_argb (uint32_t color, double gamma)
 Apply gamma function to the ARGB color value. More...
 

Function Documentation

◆ cobbletext_math_alpha_blend_over_argb()

uint32_t cobbletext_math_alpha_blend_over_argb ( uint32_t  background,
uint32_t  foreground 
)

Composite two ARGB color values using alpha blending and the "over" operator.

◆ cobbletext_math_gamma_argb()

uint32_t cobbletext_math_gamma_argb ( uint32_t  color,
double  gamma 
)

Apply gamma function to the ARGB color value.

To apply gamma correction function, use 1 / gamma.