Struct wayland_client::core::compositor::Region
[−]
[src]
pub struct Region { // some fields omitted }
Region represent a set of pixel.
They are a way to selecta fraciton of the pixels of a surface (in a similar way of the 'select' tool of a drawing software).
They are created independently of the Surface, and then attached to it. (see the the documentation of Surface for methos requiring a Region)
Methods
impl Region
fn add(&self, x: i32, y: i32, width: i32, height: i32)
Adds given rectangle to the region.
(x, y) are he coordinate of the top-left corner.
fn subtract(&self, x: i32, y: i32, width: i32, height: i32)
Subtract given rectangle from the region.
(x, y) are he coordinate of the top-left corner.