diff --git a/src/draw/lv_draw_vector.c b/src/draw/lv_draw_vector.c index 375ad0a2a4..e6fda0f91f 100644 --- a/src/draw/lv_draw_vector.c +++ b/src/draw/lv_draw_vector.c @@ -683,7 +683,7 @@ void lv_vector_dsc_set_fill_gradient_color_stops(lv_vector_dsc_t * dsc, const lv uint16_t count) { if(count > LV_GRADIENT_MAX_STOPS) { - LV_LOG_WARN("Too many gradient stops. Truncating to %d", LV_GRADIENT_MAX_STOPS); + LV_LOG_WARN("Gradient stops limited: %d, max: %d", count, LV_GRADIENT_MAX_STOPS); count = LV_GRADIENT_MAX_STOPS; } @@ -786,7 +786,7 @@ void lv_vector_dsc_set_stroke_gradient_color_stops(lv_vector_dsc_t * dsc, const uint16_t count) { if(count > LV_GRADIENT_MAX_STOPS) { - LV_LOG_WARN("Too many gradient stops. Truncating to %d", LV_GRADIENT_MAX_STOPS); + LV_LOG_WARN("Gradient stops limited: %d, max: %d", count, LV_GRADIENT_MAX_STOPS); count = LV_GRADIENT_MAX_STOPS; } diff --git a/src/draw/lv_draw_vector.h b/src/draw/lv_draw_vector.h index 103c473b05..c5366df720 100644 --- a/src/draw/lv_draw_vector.h +++ b/src/draw/lv_draw_vector.h @@ -425,7 +425,7 @@ void lv_vector_dsc_set_fill_gradient_spread(lv_vector_dsc_t * dsc, lv_vector_gra * Set fill gradient color stops for descriptor * @param dsc pointer to a vector graphic descriptor * @param stops an array of `lv_gradient_stop_t` variables - * @param count the number of stops in the array + * @param count the number of stops in the array, range: 0..LV_GRADIENT_MAX_STOPS */ void lv_vector_dsc_set_fill_gradient_color_stops(lv_vector_dsc_t * dsc, const lv_gradient_stop_t * stops, uint16_t count); diff --git a/src/draw/vg_lite/lv_vg_lite_grad.c b/src/draw/vg_lite/lv_vg_lite_grad.c index 9e84cbfd97..d01edba1b1 100644 --- a/src/draw/vg_lite/lv_vg_lite_grad.c +++ b/src/draw/vg_lite/lv_vg_lite_grad.c @@ -403,7 +403,7 @@ static bool linear_grad_create(grad_item_t * item) /* Gradient setup */ if(item->lv.stops_count > VLC_MAX_GRADIENT_STOPS) { - LV_LOG_WARN("Too many gradient stops, max is %d", VLC_MAX_GRADIENT_STOPS); + LV_LOG_WARN("Gradient stops limited: %d, max: %d", item->lv.stops_count, VLC_MAX_GRADIENT_STOPS); item->lv.stops_count = VLC_MAX_GRADIENT_STOPS; } @@ -432,7 +432,7 @@ static bool linear_ext_grad_create(grad_item_t * item) LV_PROFILER_BEGIN; if(item->lv.stops_count > VLC_MAX_COLOR_RAMP_STOPS) { - LV_LOG_WARN("Too many gradient stops, max is %d", VLC_MAX_COLOR_RAMP_STOPS); + LV_LOG_WARN("Gradient stops limited: %d, max: %d", item->lv.stops_count, VLC_MAX_GRADIENT_STOPS); item->lv.stops_count = VLC_MAX_COLOR_RAMP_STOPS; } @@ -484,7 +484,7 @@ static bool radial_grad_create(grad_item_t * item) LV_PROFILER_BEGIN; if(item->lv.stops_count > VLC_MAX_COLOR_RAMP_STOPS) { - LV_LOG_WARN("Too many gradient stops, max is %d", VLC_MAX_COLOR_RAMP_STOPS); + LV_LOG_WARN("Gradient stops limited: %d, max: %d", item->lv.stops_count, VLC_MAX_GRADIENT_STOPS); item->lv.stops_count = VLC_MAX_COLOR_RAMP_STOPS; }