How was computer graphics libraries or gtk,qt programmed?

I am wondering how was first graphic or image libraries created,I know C and Python ,I want to create plotting application,and I cant imagine these libraries(QT,OpenGL,Vulkan) written by C,how can I create my image library,I just want to create basic graphic library.

• "I cant imagine these libraries(QT,OpenGL,Vulkan) written by C" Well, Qt is written in C++ predominantly, so obviously that. It's also not a graphics library. Overall, this question is very unclear as to exactly what it is you're trying ask about. What do you mean by "computer graphics library" or "image library" and so forth? Jul 2, 2019 at 19:12

If you wanted to implement a GUI library like Qt, you might start by defining an abstract Widget class with a draw method, and then implementing concrete subclasses of it to draw particular GUI components. Add extra methods and functionality as you need it.