lv_draw_sdl_composite.h

Typedefs

typedef enum _lv_draw_sdl_composite_texture_id_t lv_draw_sdl_composite_texture_id_t

Enums

enum _lv_draw_sdl_composite_texture_id_t

Values:

enumerator LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM0
enumerator LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM1
enumerator LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET0
enumerator LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET1
enumerator LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TRANSFORM0

Functions

bool lv_draw_sdl_composite_begin(lv_draw_sdl_ctx_t *ctx, const lv_area_t *coords_in, const lv_area_t *clip_in, const lv_area_t *extension, lv_blend_mode_t blend_mode, lv_area_t *coords_out, lv_area_t *clip_out, lv_area_t *apply_area)

Begin drawing with mask. Render target will be switched to a temporary texture, and drawing coordinates may get clipped or translated

Parameters:
  • ctx -- pointer to the current draw context

  • coords_in -- Original coordinates

  • clip_in -- Original clip area

  • extension -- Useful for shadows or outlines, can be NULL

  • blend_mode -- blend mode

  • coords_out -- Translated coords

  • clip_out -- Translated clip area

  • apply_area -- Area of actual composited texture will be drawn

Returns:

true if there are any mask needs to be drawn, false otherwise

void lv_draw_sdl_composite_end(lv_draw_sdl_ctx_t *ctx, const lv_area_t *apply_area, lv_blend_mode_t blend_mode)
SDL_Texture *lv_draw_sdl_composite_texture_obtain(lv_draw_sdl_ctx_t *ctx, lv_draw_sdl_composite_texture_id_t id, lv_coord_t w, lv_coord_t h)