Comments (23)
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.
That means I can create anything I want after create a object? (Such as an oscilloscope or a multi-meter.)
from lvgl.
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.
Yep, I know that.
But if I want to redesign my oscilloscope, (will be more complex) , how?
from lvgl.
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.
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.
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.
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.
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.
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.
Then you have two options:
- Use lv_objx_templ but copy it like lv_myobj
- 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.
Sorry, closed by mistake :)
from lvgl.
Fine.
Well, that will be more expansible.
from lvgl.
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.
Yes, I know that will be better. I will prior use the objects existing.
BTW, what does "LV_MISC" means?
from lvgl.
Lv_misc contains not graphics but general stuffs like memory management, task handling etc.
from lvgl.
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.
The flash size I will check latter, not small.
from lvgl.
For about 130K extra more with LVGL...
from lvgl.
Have you disabled the unused fonts?
from lvgl.
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.
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.
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)
- lv_scr_load_anim 执行异常 HOT 3
- lvgl 9.1 canvas image not updated on the screen, unless canvas invalidated HOT 2
- The Online Font Converter has a bug HOT 1
- Gridnav interaction with spinboxes or rollers HOT 13
- Separate lv_conf.h into 2 files: vendor specific + application specific HOT 6
- API retirement HOT 2
- Add a release script
- Add more gradient features HOT 16
- Support mouse wheel scroll and other gestures HOT 5
- Finalize SDL rendering HOT 1
- Implement an OpenGL ES based renderer HOT 5
- Add blurring support HOT 12
- Improve the span widget HOT 5
- Double and triple click support
- Support Lottie animation HOT 3
- Add SVG support HOT 8
- Planned new features HOT 2
- Text & Image Shadow HOT 6
- Moving wallpaper test from benchmark wrong coordinates HOT 4
- Compiler error withing lv_label when LV_USE_BIDI is enabled HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvgl.