Xlib fast graphics features?

I am a completely new graphic programmer with very little experience (except for some small Java applications). I am considering writing a small application that requires simple 2D graphics. I do not know if I should use Xlib or cairo to execute the graphs.

Are Xlib graphics components faster than, say, cairo? If Cairo is written using Xlib, then the answer will obviously be yes, but I don't know if it is.

+3
source share
2 answers

Xlib does not perform any graphics. If you are talking about server-side primitives, they are usually quite fast these days, but they are also quite limited (lines, rectangles, polygons, ellipses, trapezoids, solid color fills) and, as a rule, do not get any special acceleration by the graphics drivers .

Honestly, you should not directly program Xlib or xcb. Instead, use a toolbox such as Qt, GTK + or FLTK (or wxWindows, or, or ....). They provide the foundation for building applications, and abstract X details in an easy-to-use API.

+7
source

, , Xlib , . , , . , .

0

All Articles