Gm.Cutout

g GObject.Object GObject.Object Gm.Cutout Gm.Cutout GObject.Object->Gm.Cutout

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (path)

get_bounds ()

get_name ()

get_path ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

bounds

Gm.Rect

r

name

str

r/w/co

path

str

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gm.Cutout(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gm.CutoutClass

A display cutout or notch.

A display cutout is an area of a display that is not usable for rendering e.g. because a camera or speaker is placed there. This includes so called “notches”. The are needs to be avoided when rendering. It is described by a SVG path. Each cutouts coordinate systems is located at the top left display corner in the displays natural orientation. Applications can query the area to avoid for rendering via the bounds property so they don’t need to deal with the SVG path themselves.

New in version 0.0.2.

classmethod new(path)
Parameters:

path (str) – An svg path

Returns:

The cutout.

Return type:

Gm.Cutout

Create a new cutout based on the given SVG path.

New in version 0.0.2.

get_bounds()
Returns:

The bounding box.

Return type:

Gm.Rect

Gets the bounding box of the cutout.

New in version 0.0.2.

get_name()
Returns:

The cutout’s name.

Return type:

str

The name of the cutout.

New in version 0.0.2.

get_path()
Returns:

The cutout’s shape as SVG path

Return type:

str

Gets the SVG path describing the shape of the cutout.

New in version 0.0.2.

Property Details

Gm.Cutout.props.bounds
Name:

bounds

Type:

Gm.Rect

Default Value:

None

Flags:

READABLE

Rectangular bounds of the cutout

New in version 0.0.2.

Gm.Cutout.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

A name identifying the cutout.

New in version 0.0.2.

Gm.Cutout.props.path
Name:

path

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The SVG path that describes the display cutout or notch.

New in version 0.0.2.