Looking for XRender examples

Clemens Eisserer linuxhippy at gmail.com
Thu Dec 6 06:05:58 PST 2007


Hello KAMALNEET,

> You can look at xclock code, and also the code of Render-related Xft functions it calls.
> Keith has screenshots of simpler applications at http://people.freedesktop.org/~keithp/render/, they can serve as tutorials, but I don't know where is the source code.
>
> Some notes on xclock's usage of XRender:
> * Destination surface is created using XftDrawPicture.
> * Source surface is created using XftDrawSrcPicture. XftDrawSrcPicture uses XCreatePixmap to create a 1x1 pixmap and then uses it as a drawable to create a new Picture. And then uses XRenderFillRectangle to draw the color onto it.
> * For rendering, xclock calls XRenderCompositeDoublePoly, with some non-NULL mask format (A8 in my test run). For non-null mask-format, Render specification says that first a temporary alpha picture is created and rasterization done on it. See "Trapezoids" in http://gitweb.freedesktop.org/?p=xorg/proto/renderproto.git;a=blob_plain;f=renderproto.txt

The code for Keith's demos would be great, thanks for the hint about
xclock - I completly forgot is was done using render ;)

Thanks alot for your hints, they provide at least some starting point to me.

lg Clemens



More information about the xorg mailing list