1 /** 2 * @file lv_demo_render.h 3 * 4 */ 5 6 #ifndef LV_DEMO_RENDER_H 7 #define LV_DEMO_RENDER_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "../lv_demos.h" 17 18 #if LV_USE_DEMO_RENDER 19 20 #if LV_USE_GRID == 0 21 #error "LV_USE_GRID needs to be enabled" 22 #endif 23 24 /********************* 25 * DEFINES 26 *********************/ 27 28 /********************** 29 * TYPEDEFS 30 **********************/ 31 typedef enum { 32 LV_DEMO_RENDER_SCENE_FILL, 33 LV_DEMO_RENDER_SCENE_BORDER, 34 LV_DEMO_RENDER_SCENE_BOX_SHADOW, 35 LV_DEMO_RENDER_SCENE_TEXT, 36 LV_DEMO_RENDER_SCENE_IMAGE_NORMAL_1, 37 LV_DEMO_RENDER_SCENE_IMAGE_RECOLOR_1, 38 LV_DEMO_RENDER_SCENE_IMAGE_NORMAL_2, 39 LV_DEMO_RENDER_SCENE_IMAGE_RECOLOR_2, 40 LV_DEMO_RENDER_SCENE_LINE, 41 LV_DEMO_RENDER_SCENE_ARC_NORMAL, 42 LV_DEMO_RENDER_SCENE_ARC_IMAGE, 43 LV_DEMO_RENDER_SCENE_TRIANGLE, 44 LV_DEMO_RENDER_SCENE_LAYER_NORMAL, 45 LV_DEMO_RENDER_SCENE_BLEND_MODE, 46 #if LV_USE_DRAW_SW_COMPLEX_GRADIENTS 47 LV_DEMO_RENDER_SCENE_LINEAR_GRADIENT, 48 LV_DEMO_RENDER_SCENE_RADIAL_GRADIENT, 49 LV_DEMO_RENDER_SCENE_CONICAL_GRADIENT, 50 #endif 51 LV_DEMO_RENDER_SCENE_NUM, 52 } lv_demo_render_scene_t; 53 54 /********************** 55 * GLOBAL PROTOTYPES 56 **********************/ 57 58 /** 59 * Run the render verification for a scenario 60 * @param id ID of the scenario to run. Element of `lv_demo_render_scene_t` 61 * @param opa set this opacity for each object 62 */ 63 void lv_demo_render(lv_demo_render_scene_t id, lv_opa_t opa); 64 65 const char * lv_demo_render_get_scene_name(lv_demo_render_scene_t id); 66 67 /********************** 68 * MACROS 69 **********************/ 70 71 #endif /*LV_USE_DEMO_RENDER*/ 72 73 #ifdef __cplusplus 74 } /* extern "C" */ 75 #endif 76 77 #endif /*LV_DEMO_RENDER_H*/ 78