mikroSDK Reference Manual
lv_draw_sw_dither.h
Go to the documentation of this file.
1
6#ifndef LV_DRAW_SW_DITHER_H
7#define LV_DRAW_SW_DITHER_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/*********************
14 * INCLUDES
15 *********************/
17
18
19/*********************
20 * DEFINES
21 *********************/
22#if LV_COLOR_DEPTH < 32 && LV_DITHER_GRADIENT == 1
23#define _DITHER_GRADIENT 1
24#else
25#define _DITHER_GRADIENT 0
26#endif
27
28/**********************
29 * TYPEDEFS
30 **********************/
31#if _DITHER_GRADIENT
32/*A signed error color component*/
33typedef struct {
34 int8_t r, g, b;
35} lv_scolor24_t;
36
38typedef void (*lv_dither_func_t)(struct _lv_gradient_cache_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w);
39
40#endif
41
42
43/**********************
44 * PROTOTYPES
45 **********************/
46#if LV_DRAW_COMPLEX
47#if _DITHER_GRADIENT
48LV_ATTRIBUTE_FAST_MEM void lv_dither_none(struct _lv_gradient_cache_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w);
49
50LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_hor(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
51 const lv_coord_t y, const lv_coord_t w);
52LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_ver(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
53 const lv_coord_t y, const lv_coord_t w);
54
55#if LV_DITHER_ERROR_DIFFUSION == 1
56LV_ATTRIBUTE_FAST_MEM void lv_dither_err_diff_hor(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
57 const lv_coord_t y, const lv_coord_t w);
58LV_ATTRIBUTE_FAST_MEM void lv_dither_err_diff_ver(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
59 const lv_coord_t y, const lv_coord_t w);
60#endif /* LV_DITHER_ERROR_DIFFUSION */
61
62#endif /* _DITHER_GRADIENT */
63#endif
64
65
66#ifdef __cplusplus
67} /*extern "C"*/
68#endif
69
70#endif
Definition lv_draw_sw_gradient.h:40