diff options
| author | Simon Glass <[email protected]> | 2025-05-02 08:46:44 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2025-05-30 09:49:32 +0100 |
| commit | 0635004e2228dea0aab023d7c56b0b74633e8a3c (patch) | |
| tree | e0a97abca641a51f48f40eede6ad48c6ec6451e7 /test | |
| parent | d25c62fd58fa664314db3bdbbbb0707757666297 (diff) | |
expo: Implement a box
It is useful to be able to draw a box around elements in the menu. Add
support for an unfilled box with a selectable thickness.
Note that there is no support for selecting the colour for any expo
objects yet.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/boot/expo.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c index c9ff5b8dd24..e4f3ffc01fb 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -28,6 +28,8 @@ enum { OBJ_TEXT3, OBJ_MENU, OBJ_MENU_TITLE, + OBJ_BOX, + OBJ_BOX2, /* strings */ STR_SCENE_TITLE, @@ -545,6 +547,14 @@ static int expo_render_image(struct unit_test_state *uts) ut_assertok(scene_obj_set_pos(scn, OBJ_MENU, 50, 400)); + id = scene_box(scn, "box", OBJ_BOX, 3, NULL); + ut_assert(id > 0); + ut_assertok(scene_obj_set_bbox(scn, OBJ_BOX, 40, 390, 1000, 510)); + + id = scene_box(scn, "box2", OBJ_BOX2, 1, NULL); + ut_assert(id > 0); + ut_assertok(scene_obj_set_bbox(scn, OBJ_BOX, 500, 200, 1000, 350)); + scn2 = expo_lookup_scene_id(exp, SCENE1); ut_asserteq_ptr(scn, scn2); scn2 = expo_lookup_scene_id(exp, SCENE2); @@ -655,8 +665,7 @@ static int expo_render_image(struct unit_test_state *uts) ut_asserteq(ITEM2, scene_menu_get_cur_item(scn, OBJ_MENU)); ut_assertok(scene_arrange(scn)); ut_assertok(expo_render(exp)); - - ut_asserteq(14848, video_compress_fb(uts, dev, false)); + ut_asserteq(14883, video_compress_fb(uts, dev, false)); ut_assertok(video_check_copy_fb(uts, dev)); /* make sure only the preview for the second item is shown */ |
