chore(style): remove the trailing space from all source files (#3188)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-03-21 18:25:51 +08:00
committed by GitHub
parent 46bd054ad4
commit 4c4f954059
223 changed files with 1719 additions and 1719 deletions

View File

@@ -1,23 +1,23 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/bmp.md
```
# BMP decoder
# BMP decoder
This extension allows the use of BMP images in LVGL.
This extension allows the use of BMP images in LVGL.
This implementation uses [bmp-decoder](https://github.com/caj-johnson/bmp-decoder) library.
The pixels are read on demand (not the whole image is loaded) so using BMP images requires very little RAM.
The pixels are read on demand (not the whole image is loaded) so using BMP images requires very little RAM.
If enabled in `lv_conf.h` by `LV_USE_BMP` LVGL will register a new image decoder automatically so BMP files can be directly used as image sources. For example:
```
lv_img_set_src(my_img, "S:path/to/picture.bmp");
```
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
## Limitations
- Only BMP files are supported and BMP images as C array (`lv_img_dsc_t`) are not. It's because there is no practical differences between how the BMP files and LVGL's image format stores the image data.
- Only BMP files are supported and BMP images as C array (`lv_img_dsc_t`) are not. It's because there is no practical differences between how the BMP files and LVGL's image format stores the image data.
- BMP files can be loaded only from file. If you want to store them in flash it's better to convert them to C array with [LVGL's image converter](https://lvgl.io/tools/imageconverter).
- The BMP files color format needs to match with `LV_COLOR_DEPTH`. Use GIMP to save the image in the required format.
Both RGB888 and ARGB888 works with `LV_COLOR_DEPTH 32`

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/ffmpeg.md
```
@@ -21,7 +21,7 @@ Enable `LV_USE_FFMPEG` in `lv_conf.h`.
See the examples below.
Note that, the FFmpeg extension doesn't use LVGL's file system.
Note that, the FFmpeg extension doesn't use LVGL's file system.
You can simply pass the path to the image or video as usual on your operating system or platform.
## Example

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/freetype.md
```
@@ -34,7 +34,7 @@ Font style supports bold and italic, you can use the following macros to set:
They can be combined.eg:`FT_FONT_STYLE_BOLD | FT_FONT_STYLE_ITALIC`.
Note that, the FreeType extension doesn't use LVGL's file system.
Note that, the FreeType extension doesn't use LVGL's file system.
You can simply pass the path to the font as usual on your operating system or platform.
## Example
@@ -44,7 +44,7 @@ You can simply pass the path to the font as usual on your operating system or pl
## Learn more
- FreeType [tutorial](https://www.freetype.org/freetype2/docs/tutorial/step1.html)
- FreeType [tutorial](https://www.freetype.org/freetype2/docs/tutorial/step1.html)
- LVGL's [font interface](https://docs.lvgl.io/v7/en/html/overview/font.html#add-a-new-font-engine)

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/fsdrv.md
```
@@ -20,6 +20,6 @@ You still need to provide the drivers and libraries, this extension provides onl
In `lv_conf.h` enable `LV_USE_FS_...` and assign an upper cased letter to `LV_FS_..._LETTER` (e.g. `'S'`).
After that you can access files using that driver letter. E.g. `"S:path/to/file.txt"`.
The work directory can be set with `LV_FS_..._PATH`. E.g. `"/home/joe/projects/"` The actual file/directory paths will be appended to it.
The work directory can be set with `LV_FS_..._PATH`. E.g. `"/home/joe/projects/"` The actual file/directory paths will be appended to it.
Cached reading is also supported if `LV_FS_..._CACHE_SIZE` is set to not `0` value. `lv_fs_read` caches this size of data to lower the number of actual reads from the storage.
Cached reading is also supported if `LV_FS_..._CACHE_SIZE` is set to not `0` value. `lv_fs_read` caches this size of data to lower the number of actual reads from the storage.

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/gif.md
```
@@ -13,7 +13,7 @@ When enabled in `lv_conf.h` with `LV_USE_GIF` `lv_gif_create(parent)` can be use
## Convert GIF files to C array
To convert a GIF file to byte values array use [LVGL's online converter](https://lvgl.io/tools/imageconverter). Select "Raw" color format and "C array" Output format.
## Use GIF images from file
For example:
@@ -21,14 +21,14 @@ For example:
lv_gif_set_src(obj, "S:path/to/example.gif");
```
Note that, a file system driver needs to be registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
Note that, a file system driver needs to be registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
## Memory requirements
To decode and display a GIF animation the following amount of RAM is required:
- `LV_COLOR_DEPTH 8`: 3 x image width x image height
- `LV_COLOR_DEPTH 16`: 4 x image width x image height
- `LV_COLOR_DEPTH 32`: 5 x image width x image height
- `LV_COLOR_DEPTH 8`: 3 x image width x image height
- `LV_COLOR_DEPTH 16`: 4 x image width x image height
- `LV_COLOR_DEPTH 32`: 5 x image width x image height
## Example
```eval_rst

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/index.md
```
# 3rd party libraries
@@ -9,7 +9,7 @@
.. toctree::
:maxdepth: 1
fsdrv
bmp
sjpg

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/png.md
```
@@ -9,11 +9,11 @@ Allow the use of PNG images in LVGL. This implementation uses [lodepng](https://
If enabled in `lv_conf.h` by `LV_USE_PNG` LVGL will register a new image decoder automatically so PNG files can be directly used as any other image sources.
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
The whole PNG image is decoded so during decoding RAM equals to `image width x image height x 4` bytes are required.
As it might take significant time to decode PNG images LVGL's [images caching](https://docs.lvgl.io/master/overview/image.html#image-caching) feature can be useful.
As it might take significant time to decode PNG images LVGL's [images caching](https://docs.lvgl.io/master/overview/image.html#image-caching) feature can be useful.
## Example
```eval_rst

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/qrcode.md
```

View File

@@ -93,7 +93,7 @@ The default animation mode is **play forward with loop**.
If you don't enable looping, a `LV_EVENT_READY` is sent when the animation can not make more progress without looping.
To get the number of frames in an animation or the current frame index, you can cast the `lv_obj_t` instance to a `lv_rlottie_t` instance and inspect the `current_frame` and `total_frames` members.
To get the number of frames in an animation or the current frame index, you can cast the `lv_obj_t` instance to a `lv_rlottie_t` instance and inspect the `current_frame` and `total_frames` members.
## Example
```eval_rst

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/sjpg.md
```
@@ -26,17 +26,17 @@ If enabled in `lv_conf.h` by `LV_USE_SJPG` LVGL will register a new image decode
lv_img_set_src(my_img, "S:path/to/picture.jpg");
```
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
## Converter
### Converting JPG to C array
- Use lvgl online tool https://lvgl.io/tools/imageconverter
- Use lvgl online tool https://lvgl.io/tools/imageconverter
- Color format = RAW, output format = C Array
### Converting JPG to SJPG
### Converting JPG to SJPG
python3 and the PIL library required. (PIL can be installed with `pip3 install pillow`)
To create SJPG from JPG: