Skip to content

wl_region¤

wayland.wl_region ¤

Region interface

A region object describes an area.

Region objects are used to describe the opaque and input regions of a surface.

Methods:

  • destroy

    Destroy region

  • add

    Add rectangle to region

  • subtract

    Subtract rectangle from region

destroy ¤

destroy() -> None

Destroy region

Destroy the region. This will invalidate the object ID.

add ¤

add(x: int, y: int, width: int, height: int) -> None

Add rectangle to region

Add the specified rectangle to the region.

Parameters:

  • x ¤

    (int) –

    Region-local x coordinate

  • y ¤

    (int) –

    Region-local y coordinate

  • width ¤

    (int) –

    Rectangle width

  • height ¤

    (int) –

    Rectangle height

subtract ¤

subtract(x: int, y: int, width: int, height: int) -> None

Subtract rectangle from region

Subtract the specified rectangle from the region.

Parameters:

  • x ¤

    (int) –

    Region-local x coordinate

  • y ¤

    (int) –

    Region-local y coordinate

  • width ¤

    (int) –

    Rectangle width

  • height ¤

    (int) –

    Rectangle height