1 /** 2 * @file lv_draw_line.h 3 * 4 */ 5 6 #ifndef LV_DRAW_LINE_H 7 #define LV_DRAW_LINE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "../lv_conf_internal.h" 17 #include "../misc/lv_color.h" 18 #include "../misc/lv_area.h" 19 #include "../misc/lv_style.h" 20 21 /********************* 22 * DEFINES 23 *********************/ 24 25 /********************** 26 * TYPEDEFS 27 **********************/ 28 typedef struct { 29 lv_color_t color; 30 lv_coord_t width; 31 lv_coord_t dash_width; 32 lv_coord_t dash_gap; 33 lv_opa_t opa; 34 lv_blend_mode_t blend_mode : 2; 35 uint8_t round_start : 1; 36 uint8_t round_end : 1; 37 uint8_t raw_end : 1; /*Do not bother with perpendicular line ending if it's not visible for any reason*/ 38 } lv_draw_line_dsc_t; 39 40 struct _lv_draw_ctx_t; 41 42 /********************** 43 * GLOBAL PROTOTYPES 44 **********************/ 45 46 void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc); 47 48 /** 49 * Draw a line 50 * @param point1 first point of the line 51 * @param point2 second point of the line 52 * @param clip the line will be drawn only in this area 53 * @param dsc pointer to an initialized `lv_draw_line_dsc_t` variable 54 */ 55 void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc, 56 const lv_point_t * point1, const lv_point_t * point2); 57 58 59 /********************** 60 * MACROS 61 **********************/ 62 63 #ifdef __cplusplus 64 } /*extern "C"*/ 65 #endif 66 67 #endif /*LV_DRAW_LINE_H*/ 68