1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

img_if: formattig

This commit is contained in:
Gabor Kiss-Vamosi 2018-08-04 22:24:16 +02:00
parent bcba74d0e7
commit 8105bced11
2 changed files with 0 additions and 10 deletions

View File

@ -33,7 +33,6 @@
* GLOBAL FUNCTIONS
**********************/
#if USE_LV_IMG
/**
* Draw an image
* @param coords the coordinates of the image
@ -45,14 +44,12 @@
void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
const void * src, const lv_style_t * style, lv_opa_t opa_scale)
{
if(src == NULL) {
lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER);
lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL);
return;
}
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->image.opa : (uint16_t)((uint16_t) style->image.opa * opa_scale) >> 8;
const uint8_t * u8_p = (uint8_t *) src;
@ -149,11 +146,8 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
}
map_fp(coords, mask, img_var->pixel_map, opa, img_var->header.chroma_keyed, img_var->header.alpha_byte, style->image.color, style->image.intense);
}
}
#endif
/**********************
* STATIC FUNCTIONS

View File

@ -27,8 +27,6 @@ extern "C" {
* GLOBAL PROTOTYPES
**********************/
#if USE_LV_IMG
/**
* Draw an image
* @param coords the coordinates of the image
@ -40,8 +38,6 @@ extern "C" {
void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
const void * src, const lv_style_t * style, lv_opa_t opa_scale);
#endif
/**********************
* MACROS
**********************/