mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
box: add box_to_fbox()
This commit is contained in:
parent
c1a27b139c
commit
cfbe54e67a
2 changed files with 13 additions and 0 deletions
|
|
@ -22,4 +22,6 @@ void box_union(struct wlr_box *box_dest, struct wlr_box *box_a,
|
|||
*/
|
||||
struct wlr_box box_fit_within(int width, int height, struct wlr_box *bounding_box);
|
||||
|
||||
struct wlr_fbox box_to_fbox(struct wlr_box *box);
|
||||
|
||||
#endif /* LABWC_BOX_H */
|
||||
|
|
|
|||
|
|
@ -73,3 +73,14 @@ box_fit_within(int width, int height, struct wlr_box *bound)
|
|||
|
||||
return box;
|
||||
}
|
||||
|
||||
struct wlr_fbox
|
||||
box_to_fbox(struct wlr_box *box)
|
||||
{
|
||||
return (struct wlr_fbox){
|
||||
.x = box->x,
|
||||
.y = box->y,
|
||||
.width = box->width,
|
||||
.height = box->height,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue