1 /**
2  * @file lv_vg_lite_stroke.h
3  *
4  */
5 
6 #ifndef LV_VG_LITE_STROKE_H
7 #define LV_VG_LITE_STROKE_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "lv_vg_lite_utils.h"
18 
19 #if LV_USE_DRAW_VG_LITE && LV_USE_VECTOR_GRAPHIC
20 
21 /*********************
22  *      DEFINES
23  *********************/
24 
25 /**********************
26  *      TYPEDEFS
27  **********************/
28 
29 struct _lv_vg_lite_path_t;
30 
31 struct _lv_draw_vg_lite_unit_t;
32 
33 /**********************
34  * GLOBAL PROTOTYPES
35  **********************/
36 
37 /**
38  * Initialize the stroke module
39  * @param unit pointer to the unit
40  */
41 void lv_vg_lite_stroke_init(struct _lv_draw_vg_lite_unit_t * unit, uint32_t cache_cnt);
42 
43 /**
44  * Deinitialize the stroke module
45  * @param unit pointer to the unit
46  */
47 void lv_vg_lite_stroke_deinit(struct _lv_draw_vg_lite_unit_t * unit);
48 
49 /**
50  * Get the stroke cache entry
51  * @param unit pointer to the unit
52  * @param path pointer to the path
53  * @param dsc pointer to the stroke descriptor
54  * @return pointer to the stroke cache entry
55  */
56 lv_cache_entry_t * lv_vg_lite_stroke_get(struct _lv_draw_vg_lite_unit_t * unit,
57                                          struct _lv_vg_lite_path_t * path,
58                                          const lv_vector_stroke_dsc_t * dsc);
59 
60 /**
61  * Get the path of a stroke
62  * @param cache_entry pointer to the stroke cache entry
63  * @return pointer to the path
64  */
65 struct _lv_vg_lite_path_t * lv_vg_lite_stroke_get_path(lv_cache_entry_t * cache_entry);
66 
67 /**
68  * Drop the stroke cache entry
69  * @param unit pointer to the unit
70  * @param stroke pointer to the stroke
71  */
72 void lv_vg_lite_stroke_drop(struct _lv_draw_vg_lite_unit_t * unit, lv_cache_entry_t * cache_entry);
73 
74 /**********************
75  *      MACROS
76  **********************/
77 
78 #endif /*LV_USE_DRAW_VG_LITE && LV_USE_VECTOR_GRAPHIC*/
79 
80 #ifdef __cplusplus
81 } /*extern "C"*/
82 #endif
83 
84 #endif /*LV_VG_LITE_STROKE_H*/
85