BackgroundTypePattern

Added in version 21.2.

class telegram.BackgroundTypePattern(document, fill, intensity, is_inverted=None, is_moving=None, *, api_kwargs=None)[source]

Bases: telegram.BackgroundType

The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their document and fill and intensity are equal.

Added in version 21.2.

Parameters:
  • document (telegram.Document) – Document with the pattern.

  • fill (telegram.BackgroundFill) – The background fill that is combined with the pattern.

  • intensity (int) – Intensity of the pattern when it is shown above the filled background; 0-100.

  • is_inverted (int, optional) – True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only.

  • is_moving (bool, optional) – True, if the background moves slightly when the device is tilted.

type[source]

Type of the background. Always PATTERN.

Type:

str

document[source]

Document with the pattern.

Type:

telegram.Document

fill[source]

The background fill that is combined with the pattern.

Type:

telegram.BackgroundFill

intensity[source]

Intensity of the pattern when it is shown above the filled background; 0-100.

Type:

int

is_inverted[source]

Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only.

Type:

int

is_moving[source]

Optional. True, if the background moves slightly when the device is tilted.

Type:

bool