1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Make lv_draw_line_dsc_t parameters constant

This commit is contained in:
Sven Krauß 2020-07-28 17:08:21 +02:00
parent 57079452b0
commit b0e3f11da1
4 changed files with 10 additions and 10 deletions

View File

@ -26,13 +26,13 @@
**********************/
LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(const lv_point_t * point1, const lv_point_t * point2,
const lv_area_t * clip,
lv_draw_line_dsc_t * dsc);
const lv_draw_line_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM static void draw_line_hor(const lv_point_t * point1, const lv_point_t * point2,
const lv_area_t * clip,
lv_draw_line_dsc_t * dsc);
const lv_draw_line_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(const lv_point_t * point1, const lv_point_t * point2,
const lv_area_t * clip,
lv_draw_line_dsc_t * dsc);
const lv_draw_line_dsc_t * dsc);
/**********************
* STATIC VARIABLES
@ -63,7 +63,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc)
* @param opa_scale scale down all opacities by the factor
*/
LV_ATTRIBUTE_FAST_MEM void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * clip,
lv_draw_line_dsc_t * dsc)
const lv_draw_line_dsc_t * dsc)
{
if(dsc->width == 0) return;
if(dsc->opa <= LV_OPA_MIN) return;
@ -120,7 +120,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_line(const lv_point_t * point1, const lv_poin
LV_ATTRIBUTE_FAST_MEM static void draw_line_hor(const lv_point_t * point1, const lv_point_t * point2,
const lv_area_t * clip,
lv_draw_line_dsc_t * dsc)
const lv_draw_line_dsc_t * dsc)
{
lv_opa_t opa = dsc->opa;
@ -221,7 +221,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_hor(const lv_point_t * point1, const
LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(const lv_point_t * point1, const lv_point_t * point2,
const lv_area_t * clip,
lv_draw_line_dsc_t * dsc)
const lv_draw_line_dsc_t * dsc)
{
lv_opa_t opa = dsc->opa;
@ -316,7 +316,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(const lv_point_t * point1, const
LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(const lv_point_t * point1, const lv_point_t * point2,
const lv_area_t * clip,
lv_draw_line_dsc_t * dsc)
const lv_draw_line_dsc_t * dsc)
{
/*Keep the great y in p1*/
lv_point_t p1;

View File

@ -48,7 +48,7 @@ typedef struct {
* @param opa_scale scale down all opacities by the factor
*/
LV_ATTRIBUTE_FAST_MEM void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * mask,
lv_draw_line_dsc_t * dsc);
const lv_draw_line_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc);

View File

@ -909,7 +909,7 @@ void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const voi
* @param style style of the line (`line` properties are used)
*/
void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t points[], uint32_t point_cnt,
lv_draw_line_dsc_t * line_draw_dsc)
const lv_draw_line_dsc_t * line_draw_dsc)
{
LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);

View File

@ -215,7 +215,7 @@ void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const voi
* @param style style of the line (`line` properties are used)
*/
void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t points[], uint32_t point_cnt,
lv_draw_line_dsc_t * line_draw_dsc);
const lv_draw_line_dsc_t * line_draw_dsc);
/**
* Draw a polygon on the canvas