Use lv_ obj_ set_ style_ outline_ width() abnormal?

I used lv_ obj_ set_ style_ outline_ Width () adds a white rectangle border to an object, resulting in a white line on the top.
I use lvgl8.2.
Does anyone have this problem?
What’s the solution?

I’m quite sure that it’s a display a config issue on hardware level.

What if you create a while 50x3 px rectangle on the same background? Do you see the white lines with it too?

Thank you for your reply!
I also think it may be a problem with the screen display configuration.
I have not modified the relevant configuration, but upgraded from lvgl8.0 to lvgl8.2.
However, such situation does not occur in lvgl8.0.
I tried according to your suggestion and found that the white line is related to the width of the rectangle.And the white line appears according to the appearance of the border. If there is no border, there is no white line.
So I don’t know why. If it’s a hardware configuration problem, I don’t know where to start. :sob:

The code is as follows:

    lv_obj_t * rect1 = lv_obj_create(cont);
    lv_obj_set_size(rect1, 100, 50);
    lv_obj_set_style_bg_color(rect1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_width(rect1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_color(rect1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_align(rect1, LV_ALIGN_CENTER, 0, 100);

    lv_obj_set_style_border_width(rect1, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(rect1, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_pad_all(rect1, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_t * rect2 = lv_obj_create(cont);
    lv_obj_set_size(rect2, 150, 50);
    lv_obj_set_style_bg_color(rect2, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_width(rect2, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_color(rect2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_align(rect2, LV_ALIGN_CENTER, 0, 200);

    lv_obj_set_style_border_width(rect2, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(rect2, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_pad_all(rect2, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_t * rect3 = lv_obj_create(cont);
    lv_obj_set_size(rect3, 200, 50);
    lv_obj_set_style_bg_color(rect3, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_width(rect3, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_color(rect3, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_align(rect3, LV_ALIGN_CENTER, 0, 300);

    lv_obj_set_style_border_width(rect3, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(rect3, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_pad_all(rect3, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_t * rect4 = lv_obj_create(cont);
    lv_obj_set_size(rect4, 250, 50);
    lv_obj_set_style_bg_color(rect4, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_width(rect4, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_color(rect4, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_align(rect4, LV_ALIGN_CENTER, 0, 400);

    lv_obj_set_style_border_width(rect4, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(rect4, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_pad_all(rect4, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

I have an idea: does it make any difference if you lower the pixel clock of the display? I mean not the SPI or parallel port clock (if you work with an external display controller), but the pixel clock of the the LCD panel itself.

An other idea: what happens if you draw simple radius=0 rectangles on a pure balck background?

I lowered the clock frequency of de, but nothing changed. Fps is about 60.

The background with white lines is a picture, but I set the background to pure black according to your suggestion, and set the radius to 0, then there is no white line. What does this mean? I don’t know what the situation is?

Please remove the red outlines too.

And please try this instead of the black background:

  while(1) {
      lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex3(lv_rand(0x000, 0xfff)), 0);