Git Product home page Git Product logo

Comments (23)

kisvegabor avatar kisvegabor commented on May 23, 2024

Hi!

Maybe you know that there are two drawing methods: buffered and unbuffered. Learn more here: http://www.gl.littlev.hu/basics#drawing-and-rendering

In buffered mode (LV_VDB_SIZE > 0) you can't draw to the display directly because the buffering is controlled by the library.

In unbuffered mode (LV_VDB_SIZE == 0) you can draw to the display directly but your drawing might be "overdrawn" when a refresh occurs.

I recommend rather to create and lv_line object to draw a line, or an lv_obj to create a simple rectangle.

In general lvgl not thinking in drawing (from the user side) but thinking in graphical objects. This way the library will know the graphical objects and can draw them correctly.

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

That means I can create anything I want after create a object? (Such as an oscilloscope or a multi-meter.)

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

For an oscilloscope you can create a line object or a chart and set the point's values. See http://www.gl.littlev.hu/object-types

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

Yep, I know that.
But if I want to redesign my oscilloscope, (will be more complex) , how?

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

If you mean you would like to add e.g. Volt/div or trigger mode just create drop down lists for them or for AC/DC coupling create button.

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

Well, I mean there are lot of point and line, that I have to draw directly into the background, and the style just diff from LVGL, how about that?

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

I just don't understand why would you like to draw directly to the background. Please tell a little bit more details about your goals.

What kind of style do you need? Please tell it too.

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

Well, for an example, I saw an Agilent Oscilloscope, I want to design like that. There are some dash line to mark or measuring, some curve to display the FFT effect, such like those.

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

Well, actually dash line is not supported now but maybe it will in a next release. Or check http://gl.littlev.hu/services to request a new feature or use thin line instead.
But for FFT a chart can be used very well. And the whole GUI of an Agilent oscilloscope can be built from objects. It's much simpler then just drawing. E.g. just create a chart or button and the library will draw or redraw it when it is required. You just need to set the chart's data or a button's click action (a function to call when clicked).

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

Ok. That will be more efficient. : P
But what if I, whatsoever, want to have my own design object, (I just found "lv_objx_templ.c") Is that right to modify it?

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

Then you have two options:

  1. Use lv_objx_templ but copy it like lv_myobj
  2. Set a new design function for an object: lv_obj_set_design_func(line1, my_func)

Are you familiar with styles? You can modify the appearances with them.

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

Sorry, closed by mistake :)

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

Fine.
Well, that will be more expansible.

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

How do you mean?

I forget to say that I recommend the using of styles because they are created for users. The new object type and design function are more complicated and kind of hacks

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

Yes, I know that will be better. I will prior use the objects existing.

BTW, what does "LV_MISC" means?

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

Lv_misc contains not graphics but general stuffs like memory management, task handling etc.

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

It seems like a little bit heavy? I just undefined most of objects, anti-aliasing, shadow, but still cost a lot of time to compile and download the firmware.
Do you have any idea?

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

The flash size I will check latter, not small.

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

For about 130K extra more with LVGL...

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

Have you disabled the unused fonts?

from lvgl.

charles-lyc avatar charles-lyc commented on May 23, 2024

I dis the used 40 Fonts, works, thanks.
BTW, it support UTF-8 encode, so does it mean I can display any language I want on the earth?

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

Basically yes. There are some "tricky" languages like Arabic or Thai which needs some things but e.g Chinease, Korean, Greek, Cyrillic etc is fully supported.

Read this to learn how the fonts work:
http://www.gl.littlev.hu/basics#fonts

And this to see how ta add a new font:
http://www.gl.littlev.hu/font-converter

from lvgl.

kisvegabor avatar kisvegabor commented on May 23, 2024

As a lot of question is answered here and we are far from the original question I close this issue.

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.