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_sdl_composite.h (2128B)

      1 /**
      2  * @file lv_draw_sdl_composite.h
      3  *
      4  */
      5 
      6 #ifndef LV_DRAW_SDL_COMPOSITE_H
      7 #define LV_DRAW_SDL_COMPOSITE_H
      8 
      9 #ifdef __cplusplus
     10 extern "C" {
     11 #endif
     12 
     13 /*********************
     14  *      INCLUDES
     15  *********************/
     16 
     17 #include "../../lv_conf_internal.h"
     18 
     19 #include LV_GPU_SDL_INCLUDE_PATH
     20 
     21 #include "lv_draw_sdl.h"
     22 #include "../../misc/lv_area.h"
     23 #include "../../misc/lv_color.h"
     24 
     25 /*********************
     26  *      DEFINES
     27  *********************/
     28 
     29 /**********************
     30  *      TYPEDEFS
     31  **********************/
     32 
     33 typedef enum lv_draw_sdl_composite_texture_id_t {
     34     LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM0,
     35     LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM1,
     36     LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET0,
     37     LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET1,
     38 } lv_draw_sdl_composite_texture_id_t;
     39 
     40 /**********************
     41  * GLOBAL PROTOTYPES
     42  **********************/
     43 
     44 /**
     45  * Begin drawing with mask. Render target will be switched to a temporary texture,
     46  * and drawing coordinates may get clipped or translated
     47  * @param coords_in Original coordinates
     48  * @param clip_in Original clip area
     49  * @param extension Useful for shadows or outlines, can be NULL
     50  * @param coords_out Translated coords
     51  * @param clip_out Translated clip area
     52  * @param apply_area Area of actual composited texture will be drawn
     53  * @return true if there are any mask needs to be drawn, false otherwise
     54  */
     55 bool lv_draw_sdl_composite_begin(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords_in, const lv_area_t * clip_in,
     56                                  const lv_area_t * extension, lv_blend_mode_t blend_mode, lv_area_t * coords_out,
     57                                  lv_area_t * clip_out, lv_area_t * apply_area);
     58 
     59 void lv_draw_sdl_composite_end(lv_draw_sdl_ctx_t * ctx, const lv_area_t * apply_area, lv_blend_mode_t blend_mode);
     60 
     61 SDL_Texture * lv_draw_sdl_composite_texture_obtain(lv_draw_sdl_ctx_t * ctx, lv_draw_sdl_composite_texture_id_t id,
     62                                                    lv_coord_t w, lv_coord_t h);
     63 
     64 /**********************
     65  *      MACROS
     66  **********************/
     67 
     68 #ifdef __cplusplus
     69 } /*extern "C"*/
     70 #endif
     71 
     72 #endif /*LV_DRAW_SDL_COMPOSITE_H*/