mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(docs): clarify how to pass color index... (#7554)
This commit is contained in:
parent
51aaf7bcde
commit
935b4016a3
@ -61,7 +61,8 @@ Drawing
|
|||||||
|
|
||||||
To set an individual pixel's color on the Canvas, use
|
To set an individual pixel's color on the Canvas, use
|
||||||
:cpp:expr:`lv_canvas_set_px(canvas, x, y, color, opa)`. With indexed color formats
|
:cpp:expr:`lv_canvas_set_px(canvas, x, y, color, opa)`. With indexed color formats
|
||||||
(``LV_COLOR_FORMAT_I1/2/4/8``) pass the color index as the ``color`` argument.
|
(``LV_COLOR_FORMAT_I1/2/4/8``) pass the color index as the ``color`` argument by using
|
||||||
|
the *blue* channel in the ``color`` value, e.g. :cpp:expr:`lv_color_make(0, 0, index)`.
|
||||||
|
|
||||||
:cpp:expr:`lv_canvas_fill_bg(canvas, lv_color_hex(0x00ff00), LV_OPA_50)` fills the whole
|
:cpp:expr:`lv_canvas_fill_bg(canvas, lv_color_hex(0x00ff00), LV_OPA_50)` fills the whole
|
||||||
Canvas to blue with 50% opacity. Note that if the current color format
|
Canvas to blue with 50% opacity. Note that if the current color format
|
||||||
|
Loading…
x
Reference in New Issue
Block a user