Go to the documentation of this file.
11 #ifndef HAL_GFX_BLENDER_H__
12 #define HAL_GFX_BLENDER_H__
26 #define HAL_GFX_BF_ZERO (0x0U)
27 #define HAL_GFX_BF_ONE (0x1U)
28 #define HAL_GFX_BF_SRCCOLOR (0x2U)
29 #define HAL_GFX_BF_INVSRCCOLOR (0x3U)
30 #define HAL_GFX_BF_SRCALPHA (0x4U)
31 #define HAL_GFX_BF_INVSRCALPHA (0x5U)
32 #define HAL_GFX_BF_DESTALPHA (0x6U)
33 #define HAL_GFX_BF_INVDESTALPHA (0x7U)
34 #define HAL_GFX_BF_DESTCOLOR (0x8U)
35 #define HAL_GFX_BF_INVDESTCOLOR (0x9U)
36 #define HAL_GFX_BF_CONSTCOLOR (0xaU)
37 #define HAL_GFX_BF_CONSTALPHA (0xbU)
40 #define HAL_GFX_BL_SIMPLE ( (uint32_t)HAL_GFX_BF_SRCALPHA | ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
41 #define HAL_GFX_BL_CLEAR ( (uint32_t)HAL_GFX_BF_ZERO )
42 #define HAL_GFX_BL_SRC ( (uint32_t)HAL_GFX_BF_ONE )
43 #define HAL_GFX_BL_SRC_OVER ( (uint32_t)HAL_GFX_BF_ONE | ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
44 #define HAL_GFX_BL_DST_OVER ( (uint32_t)HAL_GFX_BF_INVDESTALPHA | ((uint32_t)HAL_GFX_BF_ONE <<8) )
45 #define HAL_GFX_BL_SRC_IN ( (uint32_t)HAL_GFX_BF_DESTALPHA )
46 #define HAL_GFX_BL_DST_IN ( ((uint32_t)HAL_GFX_BF_SRCALPHA <<8) )
47 #define HAL_GFX_BL_SRC_OUT ( (uint32_t)HAL_GFX_BF_INVDESTALPHA )
48 #define HAL_GFX_BL_DST_OUT ( ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
49 #define HAL_GFX_BL_SRC_ATOP ( (uint32_t)HAL_GFX_BF_DESTALPHA | ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
50 #define HAL_GFX_BL_DST_ATOP ( (uint32_t)HAL_GFX_BF_INVDESTALPHA | ((uint32_t)HAL_GFX_BF_SRCALPHA <<8) )
51 #define HAL_GFX_BL_ADD ( (uint32_t)HAL_GFX_BF_ONE | ((uint32_t)HAL_GFX_BF_ONE <<8) )
52 #define HAL_GFX_BL_XOR ( (uint32_t)HAL_GFX_BF_INVDESTALPHA | ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
55 #define HAL_GFX_BLOP_NONE (0U)
56 #define HAL_GFX_BLOP_STENCIL_TXTY (0x00800000U)
57 #define HAL_GFX_BLOP_STENCIL_XY (0x00400000U)
58 #define HAL_GFX_BLOP_NO_USE_ROPBL (0x01000000U)
59 #define HAL_GFX_BLOP_DST_CKEY_NEG (0x02000000U)
60 #define HAL_GFX_BLOP_SRC_PREMULT (0x04000000U)
61 #define HAL_GFX_BLOP_MODULATE_A (0x08000000U)
62 #define HAL_GFX_BLOP_FORCE_A (0x10000000U)
63 #define HAL_GFX_BLOP_MODULATE_RGB (0x20000000U)
64 #define HAL_GFX_BLOP_SRC_CKEY (0x40000000U)
65 #define HAL_GFX_BLOP_DST_CKEY (0x80000000U)
66 #define HAL_GFX_BLOP_MASK (0xffc00000U)
195 #endif // HAL_GFX_BLENDER_H__
void hal_gfx_debug_overdraws(uint32_t enable)
Enable/disable ovedraw debugging. Disables gradient and texture, forces blending mode to HAL_GFX_BL_A...
static void hal_gfx_set_blend_blit_compose(uint32_t blending_mode)
Set blending mode for blitting with composing.
void hal_gfx_set_dst_color_key(uint32_t rgba)
Set destination color key.
static uint32_t hal_gfx_blending_mode(uint32_t src_bf, uint32_t dst_bf, uint32_t blops)
Return blending mode given source and destination blending factors and additional blending operations...
static void hal_gfx_set_blend_blit(uint32_t blending_mode)
Set blending mode for blitting.
#define HAL_GFX_BLOP_MASK
static void hal_gfx_set_blend_fill_compose(uint32_t blending_mode)
Set blending mode for filling with composing.
void hal_gfx_set_src_color_key(uint32_t rgba)
Set source color key.
static void hal_gfx_set_blend_fill(uint32_t blending_mode)
Set blending mode for filling.
void hal_gfx_set_blend(uint32_t blending_mode, hal_gfx_tex_t dst_tex, hal_gfx_tex_t fg_tex, hal_gfx_tex_t bg_tex)
Set blending mode.
void hal_gfx_set_const_color(uint32_t rgba)
Set constant color.
hal_gfx_tex_t
Graphics Texture.