Go to the documentation of this file.
51 #ifndef HAL_GFX_BLENDER_H__
52 #define HAL_GFX_BLENDER_H__
66 #define HAL_GFX_BF_ZERO (0x0U)
67 #define HAL_GFX_BF_ONE (0x1U)
68 #define HAL_GFX_BF_SRCCOLOR (0x2U)
69 #define HAL_GFX_BF_INVSRCCOLOR (0x3U)
70 #define HAL_GFX_BF_SRCALPHA (0x4U)
71 #define HAL_GFX_BF_INVSRCALPHA (0x5U)
72 #define HAL_GFX_BF_DESTALPHA (0x6U)
73 #define HAL_GFX_BF_INVDESTALPHA (0x7U)
74 #define HAL_GFX_BF_DESTCOLOR (0x8U)
75 #define HAL_GFX_BF_INVDESTCOLOR (0x9U)
76 #define HAL_GFX_BF_CONSTCOLOR (0xaU)
77 #define HAL_GFX_BF_CONSTALPHA (0xbU)
80 #define HAL_GFX_BL_SIMPLE ( (uint32_t)HAL_GFX_BF_SRCALPHA | ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
81 #define HAL_GFX_BL_CLEAR ( (uint32_t)HAL_GFX_BF_ZERO )
82 #define HAL_GFX_BL_SRC ( (uint32_t)HAL_GFX_BF_ONE )
83 #define HAL_GFX_BL_SRC_OVER ( (uint32_t)HAL_GFX_BF_ONE | ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
84 #define HAL_GFX_BL_DST_OVER ( (uint32_t)HAL_GFX_BF_INVDESTALPHA | ((uint32_t)HAL_GFX_BF_ONE <<8) )
85 #define HAL_GFX_BL_SRC_IN ( (uint32_t)HAL_GFX_BF_DESTALPHA )
86 #define HAL_GFX_BL_DST_IN ( ((uint32_t)HAL_GFX_BF_SRCALPHA <<8) )
87 #define HAL_GFX_BL_SRC_OUT ( (uint32_t)HAL_GFX_BF_INVDESTALPHA )
88 #define HAL_GFX_BL_DST_OUT ( ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
89 #define HAL_GFX_BL_SRC_ATOP ( (uint32_t)HAL_GFX_BF_DESTALPHA | ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
90 #define HAL_GFX_BL_DST_ATOP ( (uint32_t)HAL_GFX_BF_INVDESTALPHA | ((uint32_t)HAL_GFX_BF_SRCALPHA <<8) )
91 #define HAL_GFX_BL_ADD ( (uint32_t)HAL_GFX_BF_ONE | ((uint32_t)HAL_GFX_BF_ONE <<8) )
92 #define HAL_GFX_BL_XOR ( (uint32_t)HAL_GFX_BF_INVDESTALPHA | ((uint32_t)HAL_GFX_BF_INVSRCALPHA <<8) )
95 #define HAL_GFX_BLOP_NONE (0U)
96 #define HAL_GFX_BLOP_STENCIL_TXTY (0x00800000U)
97 #define HAL_GFX_BLOP_STENCIL_XY (0x00400000U)
98 #define HAL_GFX_BLOP_NO_USE_ROPBL (0x01000000U)
99 #define HAL_GFX_BLOP_DST_CKEY_NEG (0x02000000U)
100 #define HAL_GFX_BLOP_SRC_PREMULT (0x04000000U)
101 #define HAL_GFX_BLOP_MODULATE_A (0x08000000U)
102 #define HAL_GFX_BLOP_FORCE_A (0x10000000U)
103 #define HAL_GFX_BLOP_MODULATE_RGB (0x20000000U)
104 #define HAL_GFX_BLOP_SRC_CKEY (0x40000000U)
105 #define HAL_GFX_BLOP_DST_CKEY (0x80000000U)
106 #define HAL_GFX_BLOP_MASK (0xffc00000U)
235 #endif // HAL_GFX_BLENDER_H__
void hal_gfx_debug_overdraws(uint32_t enable)
Enable/disable ovedraw debugging.
static void hal_gfx_set_blend_blit_compose(uint32_t blending_mode)
Set blending mode for blitting with composing.
Header file containing functions prototypes of Graphics library.
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
blending operation mask
@ HAL_GFX_NOTEX
No Texture.
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.