add the prototypes of the examples

This commit is contained in:
Gabor Kiss-Vamosi
2021-02-19 18:19:32 +01:00
parent fe20d47b6e
commit ca4f11e9f4
18 changed files with 168 additions and 26 deletions

View File

@@ -1,11 +1,10 @@
#include "../../../lvgl.h"
#if LV_USE_IMG && LV_BUILD_EXAMPLES
/* Find the image here: https://github.com/lvgl/lv_examples/tree/master/assets */
LV_IMG_DECLARE(img_cogwheel_argb);
void lv_example_img_1(void)
{
LV_IMG_DECLARE(img_cogwheel_argb);
lv_obj_t * img1 = lv_img_create(lv_scr_act(), NULL);
lv_img_set_src(img1, &img_cogwheel_argb);
lv_obj_align(img1, NULL, LV_ALIGN_CENTER, 0, -20);

View File

@@ -30,7 +30,7 @@ void lv_example_img_2(void)
lv_obj_align(intense_slider, blue_slider, LV_ALIGN_OUT_RIGHT_MID, 25, 0);
/* Now create the actual image */
LV_IMG_DECLARE(img_cogwheel_argb);
LV_IMG_DECLARE(img_cogwheel_argb)
img1 = lv_img_create(lv_scr_act(), NULL);
lv_img_set_src(img1, &img_cogwheel_argb);
lv_obj_align(img1, NULL, LV_ALIGN_IN_RIGHT_MID, -20, 0);

View File

@@ -1,13 +1,14 @@
#include "../../../lvgl.h"
#if LV_USE_IMG && LV_BUILD_EXAMPLES
LV_IMG_DECLARE(img_cogwheel_argb);
/**
* Show transformations (zoom and rotation) using a pivot point.
*/
void lv_example_img_3(void)
{
LV_IMG_DECLARE(img_cogwheel_argb);
/* Now create the actual image */
lv_obj_t * img = lv_img_create(lv_scr_act(), NULL);
lv_img_set_src(img, &img_cogwheel_argb);

View File

@@ -1,13 +1,13 @@
#include "../../../lvgl.h"
#if LV_USE_IMG && LV_BUILD_EXAMPLES
LV_IMG_DECLARE(img_skew_strip);
/**
* Image styling and offset
*/
void lv_example_img_4(void)
{
LV_IMG_DECLARE(img_skew_strip);
static lv_style_t style;
lv_style_init(&style);
lv_style_set_bg_color(&style, LV_COLOR_YELLOW);