feat(docs): widget proofread wrap-up (#7405)

Co-authored-by: Liam <30486941+liamHowatt@users.noreply.github.com>
This commit is contained in:
Victor Wheeler
2024-12-08 15:13:21 -07:00
committed by GitHub
parent 39c3e23e06
commit 7ecf7c2e52
31 changed files with 173 additions and 169 deletions

View File

@@ -157,7 +157,7 @@ If you added ``user_data`` to the Display, you can retrieve it in an event like
.. code-block:: c
lv_display_t *display1;
lv_display_t *display1;
my_type_t *my_user_data;
display1 = (lv_display_t *)lv_event_get_current_target(e);
my_user_data = lv_display_get_user_data(display1);
@@ -383,17 +383,14 @@ Rotation
LVGL supports rotation of the display in 90 degree increments.
The orientation of the display can be changed with
``lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_0/90/180/270)``.
LVGL will swap the horizontal and vertical resolutions internally
according to the set degree, however will not perform the actual rotation.
When changing the rotation :cpp:enumerator:`LV_EVENT_SIZE_CHANGED` event is
emitted (for any part of your system that has "subscribed" to this event) to
allow reconfiguring of the hardware. In lack of hardware display rotation support
:cpp:func:`lv_draw_sw_rotate` can be used to rotate the buffer in the
:ref:`flush_callback`.
:cpp:expr:`lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_xxx)` where ``xxx`` is
0, 90, 180 or 270. This will swap the horizontal and vertical resolutions internally
according to the set degree, however it will not perform the actual rotation.
When changing the rotation, the :cpp:enumerator:`LV_EVENT_SIZE_CHANGED` event is
emitted to allow for hardware reconfiguration. If your display panel and/or its
driver chip(s) do not support rotation, :cpp:func:`lv_draw_sw_rotate` can be used to
rotate the buffer in the :ref:`flush_callback` function.
:cpp:expr:`lv_display_rotate_area(display, &area)` rotates the rendered area
according to the current rotation settings of the display.
@@ -411,6 +408,7 @@ Below is an example for rotating when the rendering mode is
**display controller**.
.. code-block:: c
/*Rotate a partially rendered area to another buffer and send it*/
void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * px_map)
{
@@ -443,6 +441,7 @@ Below is an example for rotating when the rendering mode is
into a **frame buffer of the LCD peripheral**.
.. code-block:: c
/*Rotate a partially rendered area to the frame buffer*/
void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * px_map)
{
@@ -741,11 +740,14 @@ You can manually trigger an activity using
:cpp:expr:`lv_display_trigger_activity(display1)`. If ``display1`` is ``NULL``, the
:ref:`default_display` will be used (**not all displays**).
.. admonition:: Further Reading
- `lv_port_disp_template.c <https://github.com/lvgl/lvgl/blob/master/examples/porting/lv_port_disp_template.c>`__
for a template for your own driver.
- :ref:`Drawing <draw>` to learn more about how rendering works in LVGL.
API
***

View File

@@ -171,7 +171,7 @@ bidirectional, BiDi) text rendering as well. Some examples:
BiDi support is enabled by :c:macro:`LV_USE_BIDI` in *lv_conf.h*
All texts have a base direction (LTR or RTL) which determines some
All text has a base direction (LTR or RTL) which determines some
rendering rules and the default alignment of the text (Left or Right).
However, in LVGL, the base direction is not only applied to labels. It's
a general property which can be set for every Widget. If not set then it
@@ -197,7 +197,7 @@ This list summarizes the effect of RTL base direction on Widgets:
- ``lv_buttonmatrix``: Shows buttons from right to left
- ``lv_list``: Shows icons on the right
- ``lv_dropdown``: Aligns options to the right
- The texts in ``lv_table``, ``lv_buttonmatrix``, ``lv_keyboard``, ``lv_tabview``, ``lv_dropdown``, ``lv_roller`` are "BiDi processed" to be displayed correctly
- The text strings in ``lv_table``, ``lv_buttonmatrix``, ``lv_keyboard``, ``lv_tabview``, ``lv_dropdown``, ``lv_roller`` are "BiDi processed" to be displayed correctly
Arabic and Persian support
--------------------------
@@ -213,7 +213,7 @@ LVGL supports these rules if :c:macro:`LV_USE_ARABIC_PERSIAN_CHARS` is enabled.
However, there are some limitations:
- Only displaying text is supported (e.g. on labels), text inputs (e.g. text area) don't support this feature.
- Static text (i.e. const) is not processed. E.g. texts set by :cpp:func:`lv_label_set_text` will be "Arabic processed" but :cpp:func:`lv_label_set_text_static` won't.
- Static text (i.e. const) is not processed. E.g. text set by :cpp:func:`lv_label_set_text` will be "Arabic processed" but :cpp:func:`lv_label_set_text_static` won't.
- Text get functions (e.g. :cpp:func:`lv_label_get_text`) will return the processed text.
.. _fonts_compressed: