Giter Site home page Giter Site logo

Text & Image Shadow about lvgl HOT 8 CLOSED

shirazelec avatar shirazelec commented on June 15, 2024
Text & Image Shadow

from lvgl.

Comments (8)

kisvegabor avatar kisvegabor commented on June 15, 2024

Could you share the slow version too to see exactly what we are trying to optimize?

from lvgl.

shirazelec avatar shirazelec commented on June 15, 2024

No version is slow
Only this method is more optimal for creating shadows
Please read the files

from lvgl.

kisvegabor avatar kisvegabor commented on June 15, 2024

I mean please send a code snippet to test the slow version too. (E.g. lv_obj_set_style_text_shadow_slow(...) {...}) I would like to compare them and examine why the recommended version is faster.

from lvgl.

shirazelec avatar shirazelec commented on June 15, 2024
  //old method
  lv_obj_t *lbl_shdow = lv_label_create(home_obj);
  lv_obj_set_style_text_color(lbl_shdow, lv_color_make(255, 255, 255), LV_PART_MAIN);
  lv_label_set_text(lbl_shdow, "Sample");
  lv_obj_align(lbl_shdow, LV_ALIGN_CENTER, 0, 0);

  lv_obj_t *lbl_main = lv_label_create(home_obj);
  lv_obj_set_style_text_color(lbl_main, lv_color_make(0, 0, 0), LV_PART_MAIN);
  lv_obj_align_to(lbl_main, lbl_shdow, LV_ALIGN_TOP_LEFT, -1, -1);
  lv_label_set_text(lbl_main, lv_label_get_text(lbl_shdow));

  //new method
  lv_obj_t *lbl1 = lv_label_create(home_obj);
  lv_obj_set_style_text_color(lbl1, lv_color_make(0, 0, 0), LV_PART_MAIN);
  lv_obj_set_style_text_shadow(lbl1, lv_color_make(255, 255, 255), 1, 1);
  lv_obj_center(lbl1);
  lv_label_set_text(lbl1, "Sample");

from lvgl.

kisvegabor avatar kisvegabor commented on June 15, 2024

Got it now, thanks you! How much faster was your method? And on what platform have you tested it?

from lvgl.

shirazelec avatar shirazelec commented on June 15, 2024

I also tested it on ESP32 and F1C100S, it was very effective in the speed of running animations

from lvgl.

lvgl-bot avatar lvgl-bot commented on June 15, 2024

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

from lvgl.

lvgl-bot avatar lvgl-bot commented on June 15, 2024

As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time.

So feel free to comment if you have remarks or ideas on this topic.

from lvgl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.