Skew Lines and Character's diagonals have issue in drawing

Description

Skew lines draw properly from upper side, however, the bottom side of the lines are not rendered well. Same is true for Fonts and characters with diagonal drawings

What MCU/Processor/Board and compiler are you using?

Texas DSP F28335

What LVGL version are you using?

v8.3

What do you want to achieve?

Render properly

What have you tried so far?

Enabled?Disabled “Antialiasing” and increasing the RAM

Code to reproduce

Code to reproduce the bug for skew lines is attached.

    static lv_style_t style_line1;
    lv_style_init(&style_line1);
    lv_style_set_line_width(&style_line1, 8);
    lv_style_set_line_color(&style_line1, lv_palette_main(LV_PALETTE_CYAN));
    lv_style_set_line_opa(&style_line1, LV_OPA_COVER);

    /*Create a line and apply the new style*/
    lv_obj_t * line1;
    line1 = lv_line_create(lv_scr_act());
    lv_line_set_points(line1, line_points, 2);     /*Set the points*/
    lv_obj_add_style(line1, &style_line1, 0);
    lv_obj_center(line1);

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

@kisvegabor Can I please draw your attention to this issue, it’s bit urgent for me. Thanks

Hello,

I am not sure what might cause this.

In your lv_conf is
LV_DRAW_SW_COMPLEX turned on?

Another option might be to change the line settings, try changing the line’s ROUNDED style property. So:

    static lv_style_t style_line1;
    lv_style_init(&style_line1);
    lv_style_set_line_rounded(&style_line1, 1);
    lv_style_set_line_width(&style_line1, 8);
    lv_style_set_line_color(&style_line1, lv_palette_main(LV_PALETTE_CYAN));
    lv_style_set_line_opa(&style_line1, LV_OPA_COVER);

Thanks for helping @Tinus. Yes, LV_DRAW_SW_COMPLEX is set to ‘1’ I have already tried ROUNDED property as well. Please see attached.

To give you a more detailed idea @Tinus. Here is how my labels look like. Have a look at character ‘A’ for example. It has sample pixel draw issue even if used at different places. Same is true for letter ‘T’.

Hi,

It’s very unlikely that it’s an LVGL issue, especially if it affects the labels. too. The bitmaps are drawn as images, so I can see how LVGL can seleticiely mess it up.

A few ideas:

  • Lower or increase the pixel clock of display. Not the clock of the SPI or parallel port, but the clock of the RGB lines.
  • Invalidate the data cache before flushing (if your MCU has any)

Hi @kisvegabor . Thanks for responding to the query. To give you a bit more background, I’m porting LVGL on a 16-bit microcontroller. Any specific considerations that I need to make compared to 32-bit architectures? Please through some light on that. Thank you.

I haven’t tried LVGL on 16 bit MCUs for many years, but I can’t things of anything special. Especially as the rendering is mostly working.

To confirm if the rendering is really correct you can send the rendered image byte-by-byte via a serial port to your PC. After that you need to convert this data to any image somehow to display it on your computer. I wouldn’t create an LVGL image from it manually (like this) and show it in an LVGL simulator.

Ok, I am doing an experiment to port LVGL on 16-bit controllers, will update here when I have some progress on this. Thanks for your kind response.

1 Like