Lines Matching refs:dsc
213 lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t color…
223 lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y);
233 void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c);
243 void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa);
255 void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c);
261 void lv_img_buf_free(lv_img_dsc_t * dsc);
278 void _lv_img_buf_transform_init(lv_img_transform_dsc_t * dsc);
284 bool _lv_img_buf_transform_anti_alias(lv_img_transform_dsc_t * dsc);
295 static inline bool _lv_img_buf_transform(lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord_t y) in _lv_img_buf_transform() argument
297 const uint8_t * src_u8 = (const uint8_t *)dsc->cfg.src; in _lv_img_buf_transform()
300 int32_t xt = x - dsc->cfg.pivot_x; in _lv_img_buf_transform()
301 int32_t yt = y - dsc->cfg.pivot_y; in _lv_img_buf_transform()
305 if(dsc->cfg.zoom == LV_IMG_ZOOM_NONE) { in _lv_img_buf_transform()
307 …xs = ((dsc->tmp.cosma * xt - dsc->tmp.sinma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT - 8)) + dsc->tmp.p… in _lv_img_buf_transform()
308 …ys = ((dsc->tmp.sinma * xt + dsc->tmp.cosma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT - 8)) + dsc->tmp.p… in _lv_img_buf_transform()
310 else if(dsc->cfg.angle == 0) { in _lv_img_buf_transform()
311 xt = (int32_t)((int32_t)xt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE; in _lv_img_buf_transform()
312 yt = (int32_t)((int32_t)yt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE; in _lv_img_buf_transform()
313 xs = xt + dsc->tmp.pivot_x_256; in _lv_img_buf_transform()
314 ys = yt + dsc->tmp.pivot_y_256; in _lv_img_buf_transform()
317 xt = (int32_t)((int32_t)xt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE; in _lv_img_buf_transform()
318 yt = (int32_t)((int32_t)yt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE; in _lv_img_buf_transform()
319 …xs = ((dsc->tmp.cosma * xt - dsc->tmp.sinma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT)) + dsc->tmp.pivot… in _lv_img_buf_transform()
320 …ys = ((dsc->tmp.sinma * xt + dsc->tmp.cosma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT)) + dsc->tmp.pivot… in _lv_img_buf_transform()
327 if(xs_int >= dsc->cfg.src_w) return false; in _lv_img_buf_transform()
330 if(ys_int >= dsc->cfg.src_h) return false; in _lv_img_buf_transform()
335 if(dsc->tmp.native_color) { in _lv_img_buf_transform()
336 if(dsc->tmp.has_alpha == 0) { in _lv_img_buf_transform()
339 pxi = dsc->cfg.src_w * ys_int * px_size + xs_int * px_size; in _lv_img_buf_transform()
340 _lv_memcpy_small(&dsc->res.color, &src_u8[pxi], px_size); in _lv_img_buf_transform()
344 pxi = dsc->cfg.src_w * ys_int * px_size + xs_int * px_size; in _lv_img_buf_transform()
345 _lv_memcpy_small(&dsc->res.color, &src_u8[pxi], px_size - 1); in _lv_img_buf_transform()
346 dsc->res.opa = src_u8[pxi + px_size - 1]; in _lv_img_buf_transform()
352 dsc->res.color = lv_img_buf_get_px_color(&dsc->tmp.img_dsc, xs_int, ys_int, dsc->cfg.color); in _lv_img_buf_transform()
353 dsc->res.opa = lv_img_buf_get_px_alpha(&dsc->tmp.img_dsc, xs_int, ys_int); in _lv_img_buf_transform()
356 if(dsc->tmp.chroma_keyed) { in _lv_img_buf_transform()
358 if(dsc->res.color.full == ct.full) return false; in _lv_img_buf_transform()
361 if(dsc->cfg.antialias == false) return true; in _lv_img_buf_transform()
363 dsc->tmp.xs = xs; in _lv_img_buf_transform()
364 dsc->tmp.ys = ys; in _lv_img_buf_transform()
365 dsc->tmp.xs_int = xs_int; in _lv_img_buf_transform()
366 dsc->tmp.ys_int = ys_int; in _lv_img_buf_transform()
367 dsc->tmp.pxi = pxi; in _lv_img_buf_transform()
368 dsc->tmp.px_size = px_size; in _lv_img_buf_transform()
371 ret = _lv_img_buf_transform_anti_alias(dsc); in _lv_img_buf_transform()