MadelineProtoDocs/docs/API_docs/constructors/wallPaperSettings.md

44 lines
1.7 KiB
Markdown
Raw Normal View History

2019-03-08 13:49:23 +01:00
---
title: wallPaperSettings
2019-03-08 14:35:09 +01:00
description: Wallpaper settings
2019-03-08 13:49:23 +01:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: wallPaperSettings
[Back to constructors index](index.md)
2019-03-08 14:35:09 +01:00
Wallpaper settings
2019-03-08 13:49:23 +01:00
### Attributes:
2019-03-08 14:35:09 +01:00
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|blur|[Bool](../types/Bool.md) | Optional|If set, the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12|
|motion|[Bool](../types/Bool.md) | Optional|If set, the background needs to be slightly moved when device is rotated|
|background\_color|[int](../types/int.md) | Optional|If set, a PNG pattern is to be combined with the `color` chosen by the user: the main color of the background in RGB24 format|
2020-06-16 17:50:25 +02:00
|second\_background\_color|[int](../types/int.md) | Optional|If set, a PNG pattern is to be combined with the first and second background colors (RGB24 format) in a top-bottom gradient|
2019-12-27 17:48:04 +01:00
|intensity|[int](../types/int.md) | Optional|Intensity of the pattern when it is shown above the main background color, 0-100|
2020-06-16 17:50:25 +02:00
|rotation|[int](../types/int.md) | Optional|Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45|
2019-03-08 13:49:23 +01:00
### Type: [WallPaperSettings](../types/WallPaperSettings.md)
### Example:
```php
2020-03-06 12:24:14 +01:00
$wallPaperSettings = ['_' => 'wallPaperSettings', 'blur' => Bool, 'motion' => Bool, 'background_color' => int, 'second_background_color' => int, 'intensity' => int, 'rotation' => int];
2019-03-08 13:49:23 +01:00
```
Or, if you're into Lua:
```lua
2020-03-06 12:24:14 +01:00
wallPaperSettings={_='wallPaperSettings', blur=Bool, motion=Bool, background_color=int, second_background_color=int, intensity=int, rotation=int}
2019-03-08 13:49:23 +01:00
```