[Xcb] drawing stuff

Jamey Sharp jamey at minilop.net
Sun Nov 14 11:27:18 PST 2004

On Sat, Nov 13, 2004 at 12:26:35AM -0500, Jeremy A. Kolb wrote:
> How does one draw a circle in XCB? I'm assuming XCBPolyArc?  If so then 
> how do I use it?  

I don't know: I've only written a few X applications and one replacement
for Xlib. ;-)

The X protocol specification is authoritative documentation for most of
XCB. Strip off the "XCB" prefix and the part that's left is, in most
cases, something documented there. Anything that's not documented there,
you should find documented at http://freedesktop.org/Software/XcbApi .

Much of the protocol specification is also represented pretty closely by
Xlib, so Xlib documentation can often be useful for understanding XCB.
Often you can tack "X" onto the beginning of a protocol request name to
find the Xlib function that implements it. This case is harder, though,
because the function you asked about is actually called XDrawArcs in
Xlib. Note that Xlib documentation is never authoritative for XCB,
though, even if you find an apparently similar function.

Given the above pieces of information, you should be able to find
examples on the web for whatever you may be trying to do.

All that said, if you want to draw stuff, I recommend looking into Cairo
(http://www.cairographics.org), which draws particularly pretty stuff
and has an XCB backend. Cairo is a bit slow still, and its XCB backend
is even slower due to not caching anything, but you'll probably find it
a lot easier to use and you may be a lot happier with the results.
Jamey Sharp <jamey at minilop.net> - http://minilop.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://freedesktop.org/pipermail/xcb/attachments/20041114/e84cedc3/attachment.pgp

More information about the xcb mailing list