Lines Matching +full:- +full:w
38 lv_coord_t w, h, radius; member
75 … const lv_draw_sdl_img_header_t * header, int w, int h, lv_coord_t radius,
78 static lv_draw_img_rounded_key_t rounded_key_create(const SDL_Texture * texture, lv_coord_t w, lv_c…
100 const lv_area_t * clip = draw_ctx->clip_area; in lv_draw_sdl_img_core()
104 …lv_draw_sdl_cache_key_head_img_t * key = lv_draw_sdl_texture_img_key_create(src, draw_dsc->frame_i… in lv_draw_sdl_img_core()
111 lv_draw_sdl_img_load_texture(ctx, key, key_size, src, draw_dsc->frame_id, &texture, &header, in lv_draw_sdl_img_core()
124 draw_dsc->zoom, &draw_dsc->pivot); in lv_draw_sdl_img_core()
125 lv_area_move(&zoomed_cords, coords->x1, coords->y1); in lv_draw_sdl_img_core()
135 … has_composite = lv_draw_sdl_composite_begin(ctx, &zoomed_cords, clip, NULL, draw_dsc->blend_mode, in lv_draw_sdl_img_core()
154 lv_draw_sdl_composite_end(ctx, &apply_area, draw_dsc->blend_mode); in lv_draw_sdl_img_core()
158 if(!header->managed) { in lv_draw_sdl_img_core()
170 double x = 0, y = 0, w, h; in calc_draw_part() local
171 if(SDL_RectEmpty(&header->rect)) { in calc_draw_part()
175 w = tw; in calc_draw_part()
179 x = header->rect.x; in calc_draw_part()
180 y = header->rect.y; in calc_draw_part()
181 w = header->rect.w; in calc_draw_part()
182 h = header->rect.h; in calc_draw_part()
193 clipped_src->x = (int)(x + (clipped_dst->x - coords->x1) * w / coords_w); in calc_draw_part()
194 clipped_src->y = (int)(y + (clipped_dst->y - coords->y1) * h / coords_h); in calc_draw_part()
195 clipped_src->w = (int)(w - (coords_w - clipped_dst->w) * w / coords_w); in calc_draw_part()
196 clipped_src->h = (int)(h - (coords_h - clipped_dst->h) * h / coords_h); in calc_draw_part()
208 lv_img_decoder_dsc_t * dsc = &cdsc->dec_dsc; in lv_draw_sdl_img_load_texture()
209 if(dsc->user_data && SDL_memcmp(dsc->user_data, LV_DRAW_SDL_DEC_DSC_TEXTURE_HEAD, 8) == 0) { in lv_draw_sdl_img_load_texture()
210 … lv_draw_sdl_dec_dsc_userdata_t * ptr = (lv_draw_sdl_dec_dsc_userdata_t *) dsc->user_data; in lv_draw_sdl_img_load_texture()
211 *texture = ptr->texture; in lv_draw_sdl_img_load_texture()
212 rect = ptr->rect; in lv_draw_sdl_img_load_texture()
213 if(ptr->texture_managed) { in lv_draw_sdl_img_load_texture()
216 ptr->texture_referenced = true; in lv_draw_sdl_img_load_texture()
219 *texture = upload_img_texture(ctx->renderer, dsc); in lv_draw_sdl_img_load_texture()
227 SDL_memcpy(&(*header)->base, &cdsc->dec_dsc.header, sizeof(lv_img_header_t)); in lv_draw_sdl_img_load_texture()
228 (*header)->rect = rect; in lv_draw_sdl_img_load_texture()
229 (*header)->managed = (tex_flags & LV_DRAW_SDL_CACHE_FLAG_MANAGED) != 0; in lv_draw_sdl_img_load_texture()
246 if(!dsc->img_data) { in upload_img_texture()
249 bool chroma_keyed = dsc->header.cf == (uint32_t) LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED; in upload_img_texture()
250 int h = (int) dsc->header.h; in upload_img_texture()
251 int w = (int) dsc->header.w; in upload_img_texture() local
252 void * data = (void *) dsc->img_data; in upload_img_texture()
260 …SDL_Surface * surface = SDL_CreateRGBSurfaceFrom(data, w, h, LV_COLOR_DEPTH, w * LV_COLOR_DEPTH / … in upload_img_texture()
270 lv_coord_t h = (lv_coord_t) dsc->header.h; in upload_img_texture_fallback()
271 lv_coord_t w = (lv_coord_t) dsc->header.w; in upload_img_texture_fallback() local
272 uint8_t * data = lv_mem_buf_get(w * h * sizeof(lv_color_t)); in upload_img_texture_fallback()
274 lv_img_decoder_read_line(dsc, 0, y, w, &data[y * w * sizeof(lv_color_t)]); in upload_img_texture_fallback()
280 …SDL_Surface * surface = SDL_CreateRGBSurfaceFrom(data, w, h, LV_COLOR_DEPTH, w * LV_COLOR_DEPTH / … in upload_img_texture_fallback()
299 if(param->type == LV_DRAW_MASK_TYPE_RADIUS) { in check_mask_simple_radius()
301 if(rparam->cfg.outer) return false; in check_mask_simple_radius()
302 if(!_lv_area_is_equal(&rparam->cfg.rect, coords)) return false; in check_mask_simple_radius()
303 *radius = rparam->cfg.radius; in check_mask_simple_radius()
314 SDL_Point pivot = {.x = draw_dsc->pivot.x, .y = draw_dsc->pivot.y}; in draw_img_simple()
317 if(draw_dsc->angle != 0) { in draw_img_simple()
321 SDL_RenderSetClipRect(ctx->renderer, &clip_rect); in draw_img_simple()
325 …SDL_RenderCopyEx(ctx->renderer, texture, &src_rect, &dst_rect, draw_dsc->angle, &pivot, SDL_FLIP_N… in draw_img_simple()
326 if(draw_dsc->angle != 0) { in draw_img_simple()
327 SDL_RenderSetClipRect(ctx->renderer, NULL); in draw_img_simple()
335 const int w = lv_area_get_width(coords), h = lv_area_get_height(coords); in draw_img_rounded() local
336 lv_coord_t real_radius = LV_MIN3(radius, w, h); in draw_img_rounded()
338 …SDL_Texture * frag = img_rounded_frag_obtain(ctx, texture, header, w, h, real_radius, &frag_in_cac… in draw_img_rounded()
348 for(int i = w > h ? ROUNDED_IMG_PART_LEFT : ROUNDED_IMG_PART_TOP, j = i + 3; i <= j; i++) { in draw_img_rounded()
351 … lv_area_set(&part, coords->x1, coords->y1 + radius, coords->x1 + radius - 1, coords->y2 - radius); in draw_img_rounded()
354 … lv_area_set(&part, coords->x1 + radius, coords->y1, coords->x2 - radius, coords->y2); in draw_img_rounded()
357 … lv_area_set(&part, coords->x2 - radius + 1, coords->y1 + radius, coords->x2, coords->y2 - radius); in draw_img_rounded()
360 … lv_area_set(&part, coords->x1 + radius, coords->y1, coords->x2 - radius, coords->y1 + radius - 1); in draw_img_rounded()
363 … lv_area_set(&part, coords->x1 + radius, coords->y2 - radius + 1, coords->x2 - radius, coords->y2); in draw_img_rounded()
366 … lv_area_set(&part, coords->x1, coords->y1 + radius, coords->x2, coords->y2 - radius); in draw_img_rounded()
374 SDL_RenderSetClipRect(ctx->renderer, &clip_rect); in draw_img_rounded()
375 SDL_RenderCopy(ctx->renderer, texture, &src_rect, &dst_rect); in draw_img_rounded()
377 SDL_RenderSetClipRect(ctx->renderer, NULL); in draw_img_rounded()
387 if(draw_dsc->recolor_opa > LV_OPA_TRANSP) { in apply_recolor_opa()
389 … lv_color_t recolor = lv_color_mix(draw_dsc->recolor, lv_color_white(), draw_dsc->recolor_opa); in apply_recolor_opa()
396 SDL_SetTextureAlphaMod(texture, draw_dsc->opa); in apply_recolor_opa()
400 … const lv_draw_sdl_img_header_t * header, int w, int h, lv_coord_t radius, in img_rounded_frag_obtain() argument
403 lv_draw_img_rounded_key_t key = rounded_key_create(texture, w, h, radius); in img_rounded_frag_obtain()
409 … img_frag = SDL_CreateTexture(ctx->renderer, LV_DRAW_SDL_TEXTURE_FORMAT, SDL_TEXTUREACCESS_TARGET, in img_rounded_frag_obtain()
413 SDL_Texture * old_target = SDL_GetRenderTarget(ctx->renderer); in img_rounded_frag_obtain()
414 SDL_SetRenderTarget(ctx->renderer, img_frag); in img_rounded_frag_obtain()
415 SDL_SetRenderDrawColor(ctx->renderer, 0, 0, 0, 0); in img_rounded_frag_obtain()
417 SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_NONE); in img_rounded_frag_obtain()
418 SDL_RenderFillRect(ctx->renderer, NULL); in img_rounded_frag_obtain()
419 SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_BLEND); in img_rounded_frag_obtain()
421 lv_area_t coords = {0, 0, w - 1, h - 1}; in img_rounded_frag_obtain()
422 lv_area_t frag_coords = {0, 0, full_frag_size - 1, full_frag_size - 1}; in img_rounded_frag_obtain()
437 cliprect.w = cliprect.h = radius; in img_rounded_frag_obtain()
446 cliprect.x = full_frag_size - radius; in img_rounded_frag_obtain()
451 cliprect.x = full_frag_size - radius; in img_rounded_frag_obtain()
452 cliprect.y = full_frag_size - radius; in img_rounded_frag_obtain()
457 cliprect.y = full_frag_size - radius; in img_rounded_frag_obtain()
464 SDL_RenderSetClipRect(ctx->renderer, &cliprect); in img_rounded_frag_obtain()
465 SDL_RenderCopy(ctx->renderer, texture, &srcrect, &dstrect); in img_rounded_frag_obtain()
467 SDL_RenderSetClipRect(ctx->renderer, NULL); in img_rounded_frag_obtain()
471 SDL_SetRenderTarget(ctx->renderer, old_target); in img_rounded_frag_obtain()
484 static lv_draw_img_rounded_key_t rounded_key_create(const SDL_Texture * texture, lv_coord_t w, lv_c… in rounded_key_create() argument
491 key.w = w; in rounded_key_create()