1 /** 2 * @file lv_draw_vector_private.h 3 * 4 */ 5 6 #ifndef LV_DRAW_VECTOR_PRIVATE_H 7 #define LV_DRAW_VECTOR_PRIVATE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 17 #include "lv_draw_vector.h" 18 19 #if LV_USE_VECTOR_GRAPHIC 20 21 /********************* 22 * DEFINES 23 *********************/ 24 25 /********************** 26 * TYPEDEFS 27 **********************/ 28 29 struct _lv_vector_path_t { 30 lv_vector_path_quality_t quality; 31 lv_array_t ops; 32 lv_array_t points; 33 }; 34 35 struct _lv_vector_gradient_t { 36 lv_vector_gradient_style_t style; 37 lv_gradient_stop_t stops[LV_GRADIENT_MAX_STOPS]; /**< A gradient stop array */ 38 uint16_t stops_count; /**< The number of used stops in the array */ 39 float x1; 40 float y1; 41 float x2; 42 float y2; 43 float cx; 44 float cy; 45 float cr; 46 lv_vector_gradient_spread_t spread; 47 }; 48 49 struct _lv_vector_fill_dsc_t { 50 lv_vector_draw_style_t style; 51 lv_color32_t color; 52 lv_opa_t opa; 53 lv_vector_fill_t fill_rule; 54 lv_draw_image_dsc_t img_dsc; 55 lv_vector_gradient_t gradient; 56 lv_matrix_t matrix; 57 }; 58 59 struct _lv_vector_stroke_dsc_t { 60 lv_vector_draw_style_t style; 61 lv_color32_t color; 62 lv_opa_t opa; 63 float width; 64 lv_array_t dash_pattern; 65 lv_vector_stroke_cap_t cap; 66 lv_vector_stroke_join_t join; 67 uint16_t miter_limit; 68 lv_vector_gradient_t gradient; 69 lv_matrix_t matrix; 70 }; 71 72 struct _lv_vector_draw_dsc_t { 73 lv_vector_fill_dsc_t fill_dsc; 74 lv_vector_stroke_dsc_t stroke_dsc; 75 lv_matrix_t matrix; 76 lv_vector_blend_t blend_mode; 77 lv_area_t scissor_area; 78 }; 79 80 struct _lv_draw_vector_task_dsc_t { 81 lv_draw_dsc_base_t base; 82 lv_ll_t * task_list; /*draw task list.*/ 83 }; 84 85 struct _lv_vector_dsc_t { 86 lv_layer_t * layer; 87 lv_vector_draw_dsc_t current_dsc; 88 /* private data */ 89 lv_draw_vector_task_dsc_t tasks; 90 }; 91 92 93 /********************** 94 * GLOBAL PROTOTYPES 95 **********************/ 96 97 void lv_vector_for_each_destroy_tasks(lv_ll_t * task_list, vector_draw_task_cb cb, void * data); 98 99 /********************** 100 * MACROS 101 **********************/ 102 103 #endif /* LV_USE_VECTOR_GRAPHIC */ 104 105 #ifdef __cplusplus 106 } /*extern "C"*/ 107 #endif 108 109 #endif /*LV_DRAW_VECTOR_PRIVATE_H*/ 110