acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
lv_draw_line.c (1210B)
1 /** 2 * @file lv_draw_line.c 3 * 4 */ 5 6 /********************* 7 * INCLUDES 8 *********************/ 9 #include <stdbool.h> 10 #include "../core/lv_refr.h" 11 #include "../misc/lv_math.h" 12 13 /********************* 14 * DEFINES 15 *********************/ 16 17 /********************** 18 * TYPEDEFS 19 **********************/ 20 21 /********************** 22 * STATIC PROTOTYPES 23 **********************/ 24 25 /********************** 26 * STATIC VARIABLES 27 **********************/ 28 29 /********************** 30 * MACROS 31 **********************/ 32 33 /********************** 34 * GLOBAL FUNCTIONS 35 **********************/ 36 37 LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc) 38 { 39 lv_memset_00(dsc, sizeof(lv_draw_line_dsc_t)); 40 dsc->width = 1; 41 dsc->opa = LV_OPA_COVER; 42 dsc->color = lv_color_black(); 43 } 44 45 LV_ATTRIBUTE_FAST_MEM void lv_draw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc, 46 const lv_point_t * point1, const lv_point_t * point2) 47 { 48 if(dsc->width == 0) return; 49 if(dsc->opa <= LV_OPA_MIN) return; 50 51 draw_ctx->draw_line(draw_ctx, dsc, point1, point2); 52 } 53 54 /********************** 55 * STATIC FUNCTIONS 56 **********************/