lv_area.h
API reference for lv_area.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_area_private.h
Functions
misc/lv_area.h:100function
lv_area_set
Initialize an area
void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2)| Name | Type | Description |
|---|---|---|
area_p | lv_area_t * | pointer to an area |
x1 | int32_t | left coordinate of the area |
y1 | int32_t | top coordinate of the area |
x2 | int32_t | right coordinate of the area |
y2 | int32_t | bottom coordinate of the area |
misc/lv_area.h:134function
lv_area_set_width
Set the width of an area
void lv_area_set_width(lv_area_t *area_p, int32_t w)| Name | Type | Description |
|---|---|---|
area_p | lv_area_t * | pointer to an area |
w | int32_t | the new width of the area (w == 1 makes x1 == x2) |
misc/lv_area.h:141function
lv_area_set_height
Set the height of an area
void lv_area_set_height(lv_area_t *area_p, int32_t h)| Name | Type | Description |
|---|---|---|
area_p | lv_area_t * | pointer to an area |
h | int32_t | the new height of the area (h == 1 makes y1 == y2) |
misc/lv_area.h:194function
lv_point_set
void lv_point_set(lv_point_t *p, int32_t x, int32_t y)| Name | Type |
|---|---|
p | lv_point_t * |
x | int32_t |
y | int32_t |
misc/lv_area.h:196function
lv_point_precise_set
void lv_point_precise_set(lv_point_precise_t *p, lv_value_precise_t x, lv_value_precise_t y)Enums
lv_align_t
Alignments
| Name | Value |
|---|---|
LV_ALIGN_DEFAULT | 0 |
LV_ALIGN_TOP_LEFT | |
LV_ALIGN_TOP_MID | |
LV_ALIGN_TOP_RIGHT | |
LV_ALIGN_BOTTOM_LEFT | |
LV_ALIGN_BOTTOM_MID | |
LV_ALIGN_BOTTOM_RIGHT | |
LV_ALIGN_LEFT_MID | |
LV_ALIGN_RIGHT_MID | |
LV_ALIGN_CENTER | |
LV_ALIGN_OUT_TOP_LEFT | |
LV_ALIGN_OUT_TOP_MID | |
LV_ALIGN_OUT_TOP_RIGHT | |
LV_ALIGN_OUT_BOTTOM_LEFT | |
LV_ALIGN_OUT_BOTTOM_MID | |
LV_ALIGN_OUT_BOTTOM_RIGHT | |
LV_ALIGN_OUT_LEFT_TOP | |
LV_ALIGN_OUT_LEFT_MID | |
LV_ALIGN_OUT_LEFT_BOTTOM | |
LV_ALIGN_OUT_RIGHT_TOP | |
LV_ALIGN_OUT_RIGHT_MID | |
LV_ALIGN_OUT_RIGHT_BOTTOM |
Used by 6 functions
lv_obj_set_align— paramalignlv_obj_align— paramalignlv_obj_align_to— paramalignlv_obj_set_style_align— paramvaluelv_area_align— paramalignlv_style_set_align— paramvalue
lv_dir_t
| Name | Value |
|---|---|
LV_DIR_NONE | 0x00 |
LV_DIR_LEFT | (1 << 0) |
LV_DIR_RIGHT | (1 << 1) |
LV_DIR_TOP | (1 << 2) |
LV_DIR_BOTTOM | (1 << 3) |
LV_DIR_HOR | LV_DIR_LEFT | LV_DIR_RIGHT |
LV_DIR_VER | LV_DIR_TOP | LV_DIR_BOTTOM |
LV_DIR_ALL | LV_DIR_HOR | LV_DIR_VER |
Used by 8 functions
lv_obj_set_scroll_dir— paramdirlv_indev_scroll_throw_predict— paramdirlv_barcode_set_direction— paramdirectionlv_chart_add_cursor— paramdirlv_dropdown_set_dir— paramdirlv_spinbox_set_digit_step_direction— paramdirectionlv_tabview_set_tab_bar_position— paramdirlv_tileview_add_tile— paramdir
Structs
struct
lv_point_t
Represents a point on the screen.
Used by 45 functions
lv_obj_transform_point— paramplv_obj_transform_point_array— parampointslv_obj_hit_test— parampointlv_obj_get_scroll_end— paramendlv_test_gesture_set_pinch_data— parampoint_0lv_test_gesture_set_pinch_data— parampoint_1lv_test_gesture_pinch— parampoint_begin_0lv_test_gesture_pinch— parampoint_begin_1lv_test_gesture_pinch— parampoint_end_0lv_test_gesture_pinch— parampoint_end_1lv_display_rotate_point— parampointlv_image_buf_get_transformed_area— parampivotlv_draw_character— parampointlv_draw_letter— parampointlv_draw_unit_draw_letter— paramposlv_uefi_simple_pointer_indev_create— paramdisplay_reslv_uefi_absolute_pointer_indev_create— paramdisplay_reslv_indev_set_button_points— parampointslv_indev_get_point— parampointlv_indev_get_vect— parampointlv_indev_search_obj— parampointlv_indev_get_gesture_center_point— parampointlv_indev_get_gesture_primary_point— parampointlv_indev_scroll_get_snap_dist— paramplv_freetype_italic_transform_on_pos— parampointlv_gltf_get_ray_from_2d_coordinate— paramscreen_poslv_gltf_world_to_screen— paramscreen_poslv_point_transform— parampointlv_point_transform— parampivotlv_point_array_transform— parampointslv_point_array_transform— parampivotlv_point_to_precise— paramplv_point_set— paramplv_point_swap— paramp1lv_point_swap— paramp2lv_area_is_point_on— paramp_plv_text_get_size— paramsize_reslv_text_get_size_attributes— paramsize_reslv_chart_get_point_pos_by_id— paramp_outlv_chart_set_cursor_pos— paramposlv_image_get_pivot— parampivotlv_label_get_letter_pos— paramposlv_label_get_letter_on— parampos_inlv_label_is_char_under_pos— paramposlv_spangroup_get_span_by_point— parampoint
struct
lv_point_precise_t
| Member | Type | Description |
|---|---|---|
x | lv_value_precise_t | |
y | lv_value_precise_t |
Used by 8 functions
lv_vg_lite_matrix_transform_point— parampointlv_point_from_precise— paramplv_point_precise_set— paramplv_point_precise_swap— paramp1lv_point_precise_swap— paramp2lv_matrix_transform_precise_point— parampointlv_line_set_points— parampointslv_line_set_points_mutable— parampoints
struct
lv_area_t
Represents an area of the screen.
Macros
misc/lv_area.h:206macro
LV_COORD_TYPE_SHIFT
#define LV_COORD_TYPE_SHIFT (29U)misc/lv_area.h:208macro
LV_COORD_TYPE_MASK
#define LV_COORD_TYPE_MASK (3 << LV_COORD_TYPE_SHIFT)misc/lv_area.h:209macro
LV_COORD_TYPE
#define LV_COORD_TYPE(x) \
((x) & LV_COORD_TYPE_MASK) /*Extract type specifiers*/misc/lv_area.h:210macro
LV_COORD_PLAIN
#define LV_COORD_PLAIN(x) \
((x) & ~LV_COORD_TYPE_MASK) /*Remove type specifiers*/misc/lv_area.h:212macro
LV_COORD_TYPE_PX
#define LV_COORD_TYPE_PX (0 << LV_COORD_TYPE_SHIFT)misc/lv_area.h:213macro
LV_COORD_TYPE_SPEC
#define LV_COORD_TYPE_SPEC (1 << LV_COORD_TYPE_SHIFT)misc/lv_area.h:214macro
LV_COORD_TYPE_PX_NEG
#define LV_COORD_TYPE_PX_NEG (3 << LV_COORD_TYPE_SHIFT)misc/lv_area.h:216macro
LV_COORD_IS_PX
#define LV_COORD_IS_PX(x) \
(LV_COORD_TYPE(x) == LV_COORD_TYPE_PX || LV_COORD_TYPE(x) == LV_COORD_TYPE_PX_NEG)misc/lv_area.h:217macro
LV_COORD_IS_SPEC
#define LV_COORD_IS_SPEC(x) \
(LV_COORD_TYPE(x) == LV_COORD_TYPE_SPEC)misc/lv_area.h:219macro
LV_COORD_SET_SPEC
#define LV_COORD_SET_SPEC(x) \
((x) | LV_COORD_TYPE_SPEC)misc/lv_area.h:222macro
LV_COORD_MAX
#define LV_COORD_MAX ((1 << LV_COORD_TYPE_SHIFT) - 1)Max coordinate value
misc/lv_area.h:223macro
LV_COORD_MIN
#define LV_COORD_MIN (-LV_COORD_MAX)misc/lv_area.h:226macro
LV_SIZE_CONTENT
#define LV_SIZE_CONTENT LV_COORD_SET_SPEC(LV_COORD_MAX)misc/lv_area.h:227macro
LV_PCT_STORED_MAX
#define LV_PCT_STORED_MAX (LV_COORD_MAX - 1)misc/lv_area.h:231macro
LV_PCT_POS_MAX
#define LV_PCT_POS_MAX (LV_PCT_STORED_MAX / 2)misc/lv_area.h:232macro
LV_PCT
#define LV_PCT(x) \
(LV_COORD_SET_SPEC(((x) < 0 ? (LV_PCT_POS_MAX - LV_MAX((x), -LV_PCT_POS_MAX)) : LV_MIN((x), LV_PCT_POS_MAX))))misc/lv_area.h:233macro
LV_COORD_IS_PCT
#define LV_COORD_IS_PCT(x) \
((LV_COORD_IS_SPEC(x) && LV_COORD_PLAIN(x) <= LV_PCT_STORED_MAX))misc/lv_area.h:234macro
LV_COORD_GET_PCT
#define LV_COORD_GET_PCT(x) \
(LV_COORD_PLAIN(x) > LV_PCT_POS_MAX ? LV_PCT_POS_MAX - LV_COORD_PLAIN(x) : LV_COORD_PLAIN(x))Dependencies
lv_global.hlv_obj.hlv_obj_class.hlv_obj_pos.hlv_obj_scroll.hlv_obj_style_gen.hlv_display.hlv_draw_arc.hlv_draw_blur.hlv_draw_buf.hlv_draw_line.hlv_draw_mask.hlv_draw_rect.hlv_image_decoder.hlv_draw_opengles.hlv_draw_sdl.hlv_draw_sw_blend.hlv_draw_sw.hlv_draw_sw_mask.hlv_draw_sw_utils.hlv_vg_lite_utils.hlv_opengles_driver.hlv_opengles_private.hlv_font.hlv_indev.hlv_flex.hlv_grid.hlv_gltf.hlv_area_private.hlv_grad.hlv_matrix.hlv_style.hlv_text.h
Indirect dependencies
How is this guide?
Last updated on