mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
Merge branch 'wlr_scene_tree-clip' into 'master'
Added a method of optionally clipping wlr_scene_tree children See merge request wlroots/wlroots!5276
This commit is contained in:
commit
333725fd62
2 changed files with 86 additions and 8 deletions
|
|
@ -92,6 +92,11 @@ struct wlr_scene_tree {
|
|||
struct wlr_scene_node node;
|
||||
|
||||
struct wl_list children; // wlr_scene_node.link
|
||||
|
||||
struct {
|
||||
// The clipping region in the tree nodes-local coordinate space
|
||||
struct wlr_box clip;
|
||||
} WLR_PRIVATE;
|
||||
};
|
||||
|
||||
/** The root scene-graph node. */
|
||||
|
|
@ -386,6 +391,17 @@ void wlr_scene_set_color_manager_v1(struct wlr_scene *scene, struct wlr_color_ma
|
|||
*/
|
||||
struct wlr_scene_tree *wlr_scene_tree_create(struct wlr_scene_tree *parent);
|
||||
|
||||
/**
|
||||
* Sets a cropping region for any nodes that are children of this scene tree.
|
||||
* Note that clip boxes cascade down the tree, as in the clip boxes are
|
||||
* intersected with each other from the root to the leaves.
|
||||
* The clip coordinate space will be that of the tree node.
|
||||
*
|
||||
* A NULL or empty clip will disable clipping.
|
||||
*/
|
||||
void wlr_scene_tree_set_clip(struct wlr_scene_tree *tree,
|
||||
const struct wlr_box *clip);
|
||||
|
||||
/**
|
||||
* Add a node displaying a single surface to the scene-graph.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue