diff options
| author | Simon Glass <[email protected]> | 2025-05-02 08:46:35 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2025-05-30 09:49:32 +0100 |
| commit | e3c3f83cb6ce85ef541359fa46fd802e1b53494b (patch) | |
| tree | f2f267f113099d89950b5bf17cdc8f306c076e2f /test/boot | |
| parent | baaf0907345558db58982445579e7d445ee60f21 (diff) | |
expo: Support setting the size and bounds of an object
Add a function to allow the size of an object to be set independently
of its position.
Also add a function to permit the object's bounding box to be set
independently of its dimensions.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test/boot')
| -rw-r--r-- | test/boot/expo.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c index 94c13e9b71f..2a430d3d482 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -584,6 +584,17 @@ static int expo_render_image(struct unit_test_state *uts) ut_asserteq(50 + 160, obj->bbox.x1); ut_asserteq(400 + 160, obj->bbox.y1); + scene_obj_set_width(scn, OBJ_MENU, 170); + ut_asserteq(50 + 170, obj->bbox.x1); + scene_obj_set_bbox(scn, OBJ_MENU, 60, 410, 50 + 160, 400 + 160); + ut_asserteq(60, obj->bbox.x0); + ut_asserteq(410, obj->bbox.y0); + ut_asserteq(50 + 160, obj->bbox.x1); + ut_asserteq(400 + 160, obj->bbox.y1); + + /* reset back to normal */ + scene_obj_set_bbox(scn, OBJ_MENU, 50, 400, 50 + 160, 400 + 160); + /* render it */ expo_set_scene_id(exp, SCENE1); ut_assertok(expo_render(exp)); |
