lv_draw_sw_mask.h
Typedefs
-
typedef uint8_t lv_draw_sw_mask_res_t
-
typedef uint8_t lv_draw_sw_mask_type_t
-
typedef lv_draw_sw_mask_res_t (*lv_draw_sw_mask_xcb_t)(lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len, void *p)
A common callback type for every mask type. Used internally by the library.
-
typedef uint8_t lv_draw_sw_mask_line_side_t
-
typedef _lv_draw_sw_mask_radius_circle_dsc_t _lv_draw_sw_mask_radius_circle_dsc_arr_t[4]
-
typedef struct _lv_draw_sw_mask_map_param_t lv_draw_sw_mask_map_param_t
Enums
-
enum [anonymous]
Values:
-
enumerator LV_DRAW_SW_MASK_RES_TRANSP
-
enumerator LV_DRAW_SW_MASK_RES_FULL_COVER
-
enumerator LV_DRAW_SW_MASK_RES_CHANGED
-
enumerator LV_DRAW_SW_MASK_RES_UNKNOWN
-
enumerator LV_DRAW_SW_MASK_RES_TRANSP
Functions
-
void lv_draw_sw_mask_init(void)
-
void lv_draw_sw_mask_deinit(void)
-
void lv_draw_sw_mask_free_param(void *p)
Free the data from the parameter. It's called inside
lv_draw_sw_mask_remove_id
andlv_draw_sw_mask_remove_custom
Needs to be called only in special cases when the mask is not added bylv_draw_mask_add
and not removed bylv_draw_mask_remove_id
orlv_draw_mask_remove_custom
- 参数:
p -- pointer to a mask parameter
-
void _lv_draw_sw_mask_cleanup(void)
Called by LVGL the rendering of a screen is ready to clean up the temporal (cache) data of the masks
-
void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t *param, int32_t p1x, int32_t p1y, int32_t p2x, int32_t p2y, lv_draw_sw_mask_line_side_t side)
Initialize a line mask from two points.
- 参数:
param -- pointer to a
lv_draw_mask_param_t
to initializep1x -- X coordinate of the first point of the line
p1y -- Y coordinate of the first point of the line
p2x -- X coordinate of the second point of the line
p2y -- y coordinate of the second point of the line
side -- and element of
lv_draw_mask_line_side_t
to describe which side to keep. WithLV_DRAW_MASK_LINE_SIDE_LEFT/RIGHT
and horizontal line all pixels are kept WithLV_DRAW_MASK_LINE_SIDE_TOP/BOTTOM
and vertical line all pixels are kept
-
void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t *param, int32_t p1x, int32_t py, int16_t angle, lv_draw_sw_mask_line_side_t side)
Initialize a line mask from a point and an angle.
- 参数:
param -- pointer to a
lv_draw_mask_param_t
to initializepx -- X coordinate of a point of the line
py -- X coordinate of a point of the line
angle -- right 0 deg, bottom: 90
side -- and element of
lv_draw_mask_line_side_t
to describe which side to keep. WithLV_DRAW_MASK_LINE_SIDE_LEFT/RIGHT
and horizontal line all pixels are kept WithLV_DRAW_MASK_LINE_SIDE_TOP/BOTTOM
and vertical line all pixels are kept
-
void lv_draw_sw_mask_angle_init(lv_draw_sw_mask_angle_param_t *param, int32_t vertex_x, int32_t vertex_y, int32_t start_angle, int32_t end_angle)
Initialize an angle mask.
- 参数:
param -- pointer to a
lv_draw_mask_param_t
to initializevertex_x -- X coordinate of the angle vertex (absolute coordinates)
vertex_y -- Y coordinate of the angle vertex (absolute coordinates)
start_angle -- start angle in degrees. 0 deg on the right, 90 deg, on the bottom
end_angle -- end angle
-
void lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t *param, const lv_area_t *rect, int32_t radius, bool inv)
Initialize a fade mask.
- 参数:
param -- pointer to an
lv_draw_mask_radius_param_t
to initializerect -- coordinates of the rectangle to affect (absolute coordinates)
radius -- radius of the rectangle
inv -- true: keep the pixels inside the rectangle; keep the pixels outside of the rectangle
-
void lv_draw_sw_mask_fade_init(lv_draw_sw_mask_fade_param_t *param, const lv_area_t *coords, lv_opa_t opa_top, int32_t y_top, lv_opa_t opa_bottom, int32_t y_bottom)
Initialize a fade mask.
- 参数:
param -- pointer to a
lv_draw_mask_param_t
to initializecoords -- coordinates of the area to affect (absolute coordinates)
opa_top -- opacity on the top
y_top -- at which coordinate start to change to opacity to
opa_bottom
opa_bottom -- opacity at the bottom
y_bottom -- at which coordinate reach
opa_bottom
.
-
void lv_draw_sw_mask_map_init(lv_draw_sw_mask_map_param_t *param, const lv_area_t *coords, const lv_opa_t *map)
Initialize a map mask.
- 参数:
param -- pointer to a
lv_draw_mask_param_t
to initializecoords -- coordinates of the map (absolute coordinates)
map -- array of bytes with the mask values
-
struct _lv_draw_sw_mask_common_dsc_t
-
struct lv_draw_sw_mask_line_param_t
Public Members
-
lv_point_t p1
-
lv_point_t p2
-
struct lv_draw_sw_mask_line_param_t::[anonymous] cfg
-
lv_point_t origo
-
int32_t xy_steep
-
int32_t yx_steep
-
int32_t steep
-
int32_t spx
-
uint8_t flat
-
uint8_t inv
-
lv_point_t p1
-
struct lv_draw_sw_mask_angle_param_t
Public Members
-
lv_point_t vertex_p
-
int32_t start_angle
-
int32_t end_angle
-
struct lv_draw_sw_mask_angle_param_t::[anonymous] cfg
-
lv_draw_sw_mask_line_param_t start_line
-
lv_draw_sw_mask_line_param_t end_line
-
uint16_t delta_deg
-
lv_point_t vertex_p
-
struct _lv_draw_sw_mask_radius_circle_dsc_t
-
struct lv_draw_sw_mask_radius_param_t
Public Members
-
int32_t radius
-
uint8_t outer
-
struct lv_draw_sw_mask_radius_param_t::[anonymous] cfg
-
int32_t radius
-
struct lv_draw_sw_mask_fade_param_t
-
struct _lv_draw_sw_mask_map_param_t
Public Members
-
struct _lv_draw_sw_mask_map_param_t::[anonymous] cfg
-
struct _lv_draw_sw_mask_map_param_t::[anonymous] cfg