peyk.platforms.telegram.types.background_type_pattern¶
Classes
|
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. |
- class peyk.platforms.telegram.types.background_type_pattern.BackgroundTypePattern(type: str = 'pattern', document: Document | None = None, fill: BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient | None = None, intensity: int = 0, is_inverted: bool | None = None, is_moving: bool | None = None)[source]¶
Bases:
objectThe 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.
- Variables:
type (str) – Type of the background, always ‘pattern’
document (peyk.platforms.telegram.types.document.Document | None) – Document with the pattern
fill (peyk.platforms.telegram.types.background_fill_solid.BackgroundFillSolid | peyk.platforms.telegram.types.background_fill_gradient.BackgroundFillGradient | peyk.platforms.telegram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient | None) – 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 (bool | None) – 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 | None) – True, if the background moves slightly when the device is tilted
- type: str = 'pattern'¶
- fill: BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient | None = None¶
- intensity: int = 0¶
- is_inverted: bool | None = None¶
- is_moving: bool | None = None¶
- classmethod from_dict(data: dict | None) BackgroundTypePattern | None[source]¶
Provides the from dict operation for the Telegram integration.
- Parameters:
data – Value used by this operation.
- Returns:
Result produced by the operation.