1 /** 2 * @file lv_draw_image_private.h 3 * 4 */ 5 6 #ifndef LV_DRAW_IMAGE_PRIVATE_H 7 #define LV_DRAW_IMAGE_PRIVATE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 17 #include "lv_draw_image.h" 18 19 /********************* 20 * DEFINES 21 *********************/ 22 23 /********************** 24 * TYPEDEFS 25 **********************/ 26 27 /********************** 28 * TYPEDEFS 29 **********************/ 30 31 struct _lv_draw_image_sup_t { 32 lv_color_t alpha_color; 33 const lv_color32_t * palette; 34 uint32_t palette_size : 9; 35 }; 36 37 38 /********************** 39 * GLOBAL PROTOTYPES 40 **********************/ 41 42 /** 43 * Can be used by draw units to handle the decoding and 44 * prepare everything for the actual image rendering 45 * @param draw_unit pointer to a draw unit 46 * @param draw_dsc the draw descriptor of the image 47 * @param coords the absolute coordinates of the image 48 * @param draw_core_cb a callback to perform the actual rendering 49 */ 50 void lv_draw_image_normal_helper(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, 51 const lv_area_t * coords, lv_draw_image_core_cb draw_core_cb); 52 53 /** 54 * Can be used by draw units for TILED images to handle the decoding and 55 * prepare everything for the actual image rendering 56 * @param draw_unit pointer to a draw unit 57 * @param draw_dsc the draw descriptor of the image 58 * @param coords the absolute coordinates of the image 59 * @param draw_core_cb a callback to perform the actual rendering 60 */ 61 void lv_draw_image_tiled_helper(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, 62 const lv_area_t * coords, lv_draw_image_core_cb draw_core_cb); 63 64 /** 65 * Get the area of a rectangle if its rotated and scaled 66 * @param res store the coordinates here 67 * @param w width of the rectangle to transform 68 * @param h height of the rectangle to transform 69 * @param angle angle of rotation 70 * @param scale_x zoom in x direction, (256 no zoom) 71 * @param scale_y zoom in y direction, (256 no zoom) 72 * @param pivot x,y pivot coordinates of rotation 73 */ 74 void lv_image_buf_get_transformed_area(lv_area_t * res, int32_t w, int32_t h, int32_t angle, 75 uint16_t scale_x, uint16_t scale_y, const lv_point_t * pivot); 76 77 /********************** 78 * MACROS 79 **********************/ 80 81 #ifdef __cplusplus 82 } /*extern "C"*/ 83 #endif 84 85 #endif /*LV_DRAW_IMAGE_PRIVATE_H*/ 86