mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix: add +1 but for enum bitfields to avoid overflow to negative
fixes #7155
This commit is contained in:
parent
63a7258111
commit
253981ae82
@ -43,7 +43,7 @@ typedef struct _lv_draw_image_dsc_t {
|
||||
lv_opa_t recolor_opa;
|
||||
|
||||
lv_opa_t opa;
|
||||
lv_blend_mode_t blend_mode : 4;
|
||||
lv_blend_mode_t blend_mode : 3;
|
||||
|
||||
uint16_t antialias : 1;
|
||||
uint16_t tile : 1;
|
||||
|
@ -35,7 +35,7 @@ typedef struct {
|
||||
int32_t dash_width;
|
||||
int32_t dash_gap;
|
||||
lv_opa_t opa;
|
||||
lv_blend_mode_t blend_mode : 2;
|
||||
lv_blend_mode_t blend_mode : 3;
|
||||
uint8_t round_start : 1;
|
||||
uint8_t round_end : 1;
|
||||
uint8_t raw_end : 1; /**< Do not bother with perpendicular line ending if it's not visible for any reason */
|
||||
|
@ -53,7 +53,7 @@ struct _lv_draw_sw_mask_line_param_t {
|
||||
lv_point_t p2;
|
||||
|
||||
/*Which side to keep?*/
|
||||
lv_draw_sw_mask_line_side_t side : 2;
|
||||
lv_draw_sw_mask_line_side_t side : 3;
|
||||
} cfg;
|
||||
|
||||
/** A point of the line */
|
||||
|
@ -140,10 +140,10 @@ typedef struct {
|
||||
typedef struct {
|
||||
lv_gradient_stop_t stops[LV_GRADIENT_MAX_STOPS]; /**< A gradient stop array */
|
||||
uint8_t stops_count; /**< The number of used stops in the array */
|
||||
lv_grad_dir_t dir : 3; /**< The gradient direction.
|
||||
lv_grad_dir_t dir : 4; /**< The gradient direction.
|
||||
* Any of LV_GRAD_DIR_NONE, LV_GRAD_DIR_VER, LV_GRAD_DIR_HOR,
|
||||
* LV_GRAD_TYPE_LINEAR, LV_GRAD_TYPE_RADIAL, LV_GRAD_TYPE_CONICAL */
|
||||
lv_grad_extend_t extend : 2; /**< Behaviour outside the defined range.
|
||||
lv_grad_extend_t extend : 3; /**< Behaviour outside the defined range.
|
||||
* LV_GRAD_EXTEND_NONE, LV_GRAD_EXTEND_PAD, LV_GRAD_EXTEND_REPEAT, LV_GRAD_EXTEND_REFLECT */
|
||||
#if LV_USE_DRAW_SW_COMPLEX_GRADIENTS
|
||||
union {
|
||||
|
@ -64,7 +64,7 @@ struct _lv_chart_t {
|
||||
uint32_t vdiv_cnt; /**< Number of vertical division lines*/
|
||||
uint32_t point_cnt; /**< Point number in a data line*/
|
||||
lv_chart_type_t type : 3; /**< Line or column chart*/
|
||||
lv_chart_update_mode_t update_mode : 1;
|
||||
lv_chart_update_mode_t update_mode : 2;
|
||||
};
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@ struct _lv_label_t {
|
||||
|
||||
lv_point_t size_cache; /**< Text size cache */
|
||||
lv_point_t offset; /**< Text draw position offset */
|
||||
lv_label_long_mode_t long_mode : 3; /**< Determine what to do with the long texts */
|
||||
lv_label_long_mode_t long_mode : 4; /**< Determine what to do with the long texts */
|
||||
uint8_t static_txt : 1; /**< Flag to indicate the text is static */
|
||||
uint8_t recolor : 1; /**< Enable in-line letter re-coloring*/
|
||||
uint8_t expand : 1; /**< Ignore real width (used by the library with LV_LABEL_LONG_SCROLL) */
|
||||
|
@ -56,7 +56,7 @@ struct _lv_menu_t {
|
||||
uint8_t cur_depth;
|
||||
uint8_t prev_depth;
|
||||
uint8_t sidebar_generated : 1;
|
||||
lv_menu_mode_header_t mode_header : 2;
|
||||
lv_menu_mode_header_t mode_header : 3;
|
||||
lv_menu_mode_root_back_button_t mode_root_back_btn : 1;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user