25#define LV_MASK_ID_INV (-1)
27# define _LV_MASK_MAX_NUM 16
29# define _LV_MASK_MAX_NUM 1
37 LV_DRAW_MASK_RES_TRANSP,
38 LV_DRAW_MASK_RES_FULL_COVER,
39 LV_DRAW_MASK_RES_CHANGED,
40 LV_DRAW_MASK_RES_UNKNOWN
43typedef uint8_t lv_draw_mask_res_t;
54#if LV_DRAW_COMPLEX == 0
55static inline uint8_t lv_draw_mask_get_cnt(
void)
60static inline bool lv_draw_mask_is_any(
const lv_area_t * a)
71 LV_DRAW_MASK_TYPE_LINE,
72 LV_DRAW_MASK_TYPE_ANGLE,
73 LV_DRAW_MASK_TYPE_RADIUS,
74 LV_DRAW_MASK_TYPE_FADE,
75 LV_DRAW_MASK_TYPE_MAP,
76 LV_DRAW_MASK_TYPE_POLYGON,
79typedef uint8_t lv_draw_mask_type_t;
82 LV_DRAW_MASK_LINE_SIDE_LEFT = 0,
83 LV_DRAW_MASK_LINE_SIDE_RIGHT,
84 LV_DRAW_MASK_LINE_SIDE_TOP,
85 LV_DRAW_MASK_LINE_SIDE_BOTTOM,
92typedef lv_draw_mask_res_t (*lv_draw_mask_xcb_t)(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
96typedef uint8_t lv_draw_mask_line_side_t;
99 lv_draw_mask_xcb_t cb;
100 lv_draw_mask_type_t type;
101} _lv_draw_mask_common_dsc_t;
105 _lv_draw_mask_common_dsc_t dsc;
115 lv_draw_mask_line_side_t side : 2;
139} lv_draw_mask_line_param_t;
143 _lv_draw_mask_common_dsc_t dsc;
147 lv_coord_t start_angle;
148 lv_coord_t end_angle;
151 lv_draw_mask_line_param_t start_line;
152 lv_draw_mask_line_param_t end_line;
154} lv_draw_mask_angle_param_t;
159 uint16_t * x_start_on_y;
160 uint16_t * opa_start_on_y;
164} _lv_draw_mask_radius_circle_dsc_t;
166typedef _lv_draw_mask_radius_circle_dsc_t _lv_draw_mask_radius_circle_dsc_arr_t[LV_CIRCLE_CACHE_SIZE];
170 _lv_draw_mask_common_dsc_t dsc;
179 _lv_draw_mask_radius_circle_dsc_t * circle;
180} lv_draw_mask_radius_param_t;
185 _lv_draw_mask_common_dsc_t dsc;
195} lv_draw_mask_fade_param_t;
198typedef struct _lv_draw_mask_map_param_t {
200 _lv_draw_mask_common_dsc_t dsc;
204 const lv_opa_t * map;
206} lv_draw_mask_map_param_t;
210 _lv_draw_mask_common_dsc_t dsc;
216} lv_draw_mask_polygon_param_t;
229int16_t lv_draw_mask_add(
void * param,
void * custom_id);
244LV_ATTRIBUTE_FAST_MEM lv_draw_mask_res_t lv_draw_mask_apply(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
260LV_ATTRIBUTE_FAST_MEM lv_draw_mask_res_t lv_draw_mask_apply_ids(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
261 lv_coord_t len,
const int16_t * ids, int16_t ids_count);
271void * lv_draw_mask_remove_id(int16_t
id);
279void * lv_draw_mask_remove_custom(
void * custom_id);
288void lv_draw_mask_free_param(
void * p);
294void _lv_draw_mask_cleanup(
void);
302LV_ATTRIBUTE_FAST_MEM uint8_t lv_draw_mask_get_cnt(
void);
310bool lv_draw_mask_is_any(
const lv_area_t * a);
325void lv_draw_mask_line_points_init(lv_draw_mask_line_param_t * param, lv_coord_t p1x, lv_coord_t p1y, lv_coord_t p2x,
326 lv_coord_t p2y, lv_draw_mask_line_side_t side);
338void lv_draw_mask_line_angle_init(lv_draw_mask_line_param_t * param, lv_coord_t p1x, lv_coord_t py, int16_t angle,
339 lv_draw_mask_line_side_t side);
349void lv_draw_mask_angle_init(lv_draw_mask_angle_param_t * param, lv_coord_t vertex_x, lv_coord_t vertex_y,
350 lv_coord_t start_angle, lv_coord_t end_angle);
359void lv_draw_mask_radius_init(lv_draw_mask_radius_param_t * param,
const lv_area_t * rect, lv_coord_t radius,
bool inv);
370void lv_draw_mask_fade_init(lv_draw_mask_fade_param_t * param,
const lv_area_t * coords, lv_opa_t opa_top,
372 lv_opa_t opa_bottom, lv_coord_t y_bottom);
380void lv_draw_mask_map_init(lv_draw_mask_map_param_t * param,
const lv_area_t * coords,
const lv_opa_t * map);
382void lv_draw_mask_polygon_init(lv_draw_mask_polygon_param_t * param,
const lv_point_t * points, uint16_t point_cnt);
Definition lv_draw_mask.h:45