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_core/lv_style.h" 17 18 /********************* 19 * DEFINES 20 *********************/ 21 22 /********************** 23 * TYPEDEFS 24 **********************/ 25 typedef struct { 26 lv_color_t color; 27 lv_style_int_t width; 28 lv_style_int_t dash_width; 29 lv_style_int_t dash_gap; 30 lv_opa_t opa; 31 lv_blend_mode_t blend_mode : 2; 32 uint8_t round_start : 1; 33 uint8_t round_end : 1; 34 uint8_t raw_end : 1; /*Do not bother with perpendicular line ending is it's not visible for any reason*/ 35 } lv_draw_line_dsc_t; 36 37 /********************** 38 * GLOBAL PROTOTYPES 39 **********************/ 40 41 //! @cond Doxygen_Suppress 42 /** 43 * Draw a line 44 * @param point1 first point of the line 45 * @param point2 second point of the line 46 * @param clip the line will be drawn only in this area 47 * @param dsc pointer to an initialized `lv_draw_line_dsc_t` variable 48 */ 49 LV_ATTRIBUTE_FAST_MEM void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * clip, 50 const lv_draw_line_dsc_t * dsc); 51 52 LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc); 53 54 55 //! @endcond 56 57 /********************** 58 * MACROS 59 **********************/ 60 61 #ifdef __cplusplus 62 } /* extern "C" */ 63 #endif 64 65 #endif /*LV_DRAW_LINE_H*/ 66