2024-10-11 21:31:35 +02:00
|
|
|
/**
|
2023-10-25 13:38:37 +02:00
|
|
|
* @file lv_demo_render.h
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LV_DEMO_RENDER_H
|
|
|
|
#define LV_DEMO_RENDER_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*********************
|
|
|
|
* INCLUDES
|
|
|
|
*********************/
|
|
|
|
#include "../lv_demos.h"
|
|
|
|
|
|
|
|
#if LV_USE_DEMO_RENDER
|
|
|
|
|
2024-01-12 03:41:14 +01:00
|
|
|
#if LV_USE_GRID == 0
|
|
|
|
#error "LV_USE_GRID needs to be enabled"
|
|
|
|
#endif
|
|
|
|
|
2023-10-25 13:38:37 +02:00
|
|
|
/*********************
|
|
|
|
* DEFINES
|
|
|
|
*********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* TYPEDEFS
|
|
|
|
**********************/
|
2023-10-26 23:07:40 +02:00
|
|
|
typedef enum {
|
|
|
|
LV_DEMO_RENDER_SCENE_FILL,
|
|
|
|
LV_DEMO_RENDER_SCENE_BORDER,
|
|
|
|
LV_DEMO_RENDER_SCENE_BOX_SHADOW,
|
|
|
|
LV_DEMO_RENDER_SCENE_TEXT,
|
2024-04-20 13:14:25 +02:00
|
|
|
LV_DEMO_RENDER_SCENE_IMAGE_NORMAL_1,
|
|
|
|
LV_DEMO_RENDER_SCENE_IMAGE_RECOLOR_1,
|
|
|
|
LV_DEMO_RENDER_SCENE_IMAGE_NORMAL_2,
|
|
|
|
LV_DEMO_RENDER_SCENE_IMAGE_RECOLOR_2,
|
2023-10-26 23:07:40 +02:00
|
|
|
LV_DEMO_RENDER_SCENE_LINE,
|
|
|
|
LV_DEMO_RENDER_SCENE_ARC_NORMAL,
|
|
|
|
LV_DEMO_RENDER_SCENE_ARC_IMAGE,
|
|
|
|
LV_DEMO_RENDER_SCENE_TRIANGLE,
|
|
|
|
LV_DEMO_RENDER_SCENE_LAYER_NORMAL,
|
2023-11-20 22:32:07 +01:00
|
|
|
LV_DEMO_RENDER_SCENE_BLEND_MODE,
|
2024-05-26 17:17:16 +02:00
|
|
|
#if LV_USE_DRAW_SW_COMPLEX_GRADIENTS
|
|
|
|
LV_DEMO_RENDER_SCENE_LINEAR_GRADIENT,
|
|
|
|
LV_DEMO_RENDER_SCENE_RADIAL_GRADIENT,
|
|
|
|
LV_DEMO_RENDER_SCENE_CONICAL_GRADIENT,
|
|
|
|
#endif
|
2024-08-02 01:46:42 -04:00
|
|
|
LV_DEMO_RENDER_SCENE_NUM,
|
2023-10-26 23:07:40 +02:00
|
|
|
} lv_demo_render_scene_t;
|
2023-10-25 13:38:37 +02:00
|
|
|
|
|
|
|
/**********************
|
|
|
|
* GLOBAL PROTOTYPES
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Run the render verification for a scenario
|
2023-10-26 23:07:40 +02:00
|
|
|
* @param id ID of the scenario to run. Element of `lv_demo_render_scene_t`
|
|
|
|
* @param opa set this opacity for each object
|
2023-10-25 13:38:37 +02:00
|
|
|
*/
|
2023-10-26 23:07:40 +02:00
|
|
|
void lv_demo_render(lv_demo_render_scene_t id, lv_opa_t opa);
|
|
|
|
|
|
|
|
const char * lv_demo_render_get_scene_name(lv_demo_render_scene_t id);
|
2023-10-25 13:38:37 +02:00
|
|
|
|
|
|
|
/**********************
|
|
|
|
* MACROS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
#endif /*LV_USE_DEMO_RENDER*/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /*LV_DEMO_RENDER_H*/
|