1 /**
2  * @file lv_draw_label_private.h
3  *
4  */
5 
6 #ifndef LV_DRAW_LABEL_PRIVATE_H
7 #define LV_DRAW_LABEL_PRIVATE_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "lv_draw_label.h"
18 
19 /*********************
20  *      DEFINES
21  *********************/
22 
23 /**********************
24  *      TYPEDEFS
25  **********************/
26 
27 /** Store some info to speed up drawing of very large texts
28  * It takes a lot of time to get the first visible character because
29  * all the previous characters needs to be checked to calculate the positions.
30  * This structure stores an earlier (e.g. at -1000 px) coordinate and the index of that line.
31  * Therefore the calculations can start from here.*/
32 struct _lv_draw_label_hint_t {
33     /** Index of the line at `y` coordinate*/
34     int32_t line_start;
35 
36     /** Give the `y` coordinate of the first letter at `line start` index. Relative to the label's coordinates*/
37     int32_t y;
38 
39     /** The 'y1' coordinate of the label when the hint was saved.
40      * Used to invalidate the hint if the label has moved too much.*/
41     int32_t coord_y;
42 };
43 
44 struct _lv_draw_glyph_dsc_t {
45     const void *
46     glyph_data;  /**< Depends on `format` field, it could be image source or draw buf of bitmap or vector data. */
47     lv_font_glyph_format_t format;
48     const lv_area_t * letter_coords;
49     const lv_area_t * bg_coords;
50     lv_font_glyph_dsc_t * g;
51     lv_color_t color;
52     lv_opa_t opa;
53     int32_t rotation;
54     lv_point_t pivot;          /**< Rotation pivot point associated with total glyph including line_height */
55     lv_draw_buf_t * _draw_buf; /**< a shared draw buf for get_bitmap, do not use it directly, use glyph_data instead */
56 };
57 
58 
59 /**********************
60  * GLOBAL PROTOTYPES
61  **********************/
62 
63 /**********************
64  *      MACROS
65  **********************/
66 
67 #ifdef __cplusplus
68 } /*extern "C"*/
69 #endif
70 
71 #endif /*LV_DRAW_LABEL_PRIVATE_H*/
72