expo: Rename scene_dim to scene_obj_bbox
At present we assume that each object is a simple box and that it fills
the whole box.
This is quite limiting for text objects, which we may want to centre
within the box. We need a position within the box where drawing starts.
Rename the scene_dim struct to indicate that it is a bounding box.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/boot/scene_menu.c b/boot/scene_menu.c
index 6a2f5b6..20a6a6b 100644
--- a/boot/scene_menu.c
+++ b/boot/scene_menu.c
@@ -102,7 +102,7 @@
label = scene_obj_find(scn, item->label_id, SCENEOBJT_NONE);
ret = scene_obj_set_pos(scn, menu->pointer_id,
- menu->obj.dim.x + 200, label->dim.y);
+ menu->obj.bbox.x + 200, label->bbox.y);
if (ret < 0)
return log_msg_ret("ptr", ret);
}
@@ -186,8 +186,8 @@
}
if (bbox.valid) {
- menu->obj.dim.w = bbox.x1 - bbox.x0;
- menu->obj.dim.h = bbox.y1 - bbox.y0;
+ menu->obj.bbox.w = bbox.x1 - bbox.x0;
+ menu->obj.bbox.h = bbox.y1 - bbox.y0;
}
return 0;
@@ -205,12 +205,12 @@
int x, y;
int ret;
- x = menu->obj.dim.x;
- y = menu->obj.dim.y;
+ x = menu->obj.bbox.x;
+ y = menu->obj.bbox.y;
if (menu->title_id) {
int width;
- ret = scene_obj_set_pos(scn, menu->title_id, menu->obj.dim.x, y);
+ ret = scene_obj_set_pos(scn, menu->title_id, menu->obj.bbox.x, y);
if (ret < 0)
return log_msg_ret("tit", ret);