How to build a small GUI engine like Lvgl

I want to build my own GUI engine for my college home work. But I search all net. I cant find any artical about build the gui system. But there are lot of “how to build your own os build your bios how to build game.” with out how to build your ui engine

1 Like

First choose a LCD or Any other kind of display device. Then go through its datasheet and using that info write a small driver for this display. This DRIVER should init the display and allow user to plot a single pixel on display using desired colour. Learn about double buffering, flickering avoidance. Then write the graphics primitives like line, rectangle circle etc. After that you need text rendering which is a tough part. To improve on it you need anti aliasing algorithm. There are several books on computer graphics internals.
Now using these primitives you can make high level things like Window, widgets like buttons text box, menu, dialogs etc. These are fairly easy to write if you have good graphics primitives layer.

For example.

Bresenham’s line algorithm

thank you very much! I have already did the basic draw program! like draw line,cricle…
I dont understand how to manage so much things like the blend of each widget, things of widgets,the animate of them.