Top |
XLib-XRender BackendXLib-XRender Backend — X Window System rendering using XLib and the X Render extension |
cairo_surface_t * | cairo_xlib_surface_create_with_xrender_format () |
XRenderPictFormat * | cairo_xlib_surface_get_xrender_format () |
The XLib surface is used to render cairo graphics to X Window System windows and pixmaps using the XLib and Xrender libraries.
Note that the XLib surface automatically takes advantage of X Render extension if it is available.
cairo_surface_t * cairo_xlib_surface_create_with_xrender_format (Display *dpy
,Drawable drawable
,Screen *screen
,XRenderPictFormat *format
,int width
,int height
);
Creates an Xlib surface that draws to the given drawable. The way that colors are represented in the drawable is specified by the provided picture format.
Note: If drawable
is a Window, then the function
cairo_xlib_surface_set_size()
must be called whenever the size of the
window changes.
dpy |
an X Display |
|
drawable |
an X Drawable, (a Pixmap or a Window) |
|
screen |
the X Screen associated with |
|
format |
the picture format to use for drawing to |
|
width |
the current width of |
|
height |
the current height of |
Since: 1.0
XRenderPictFormat *
cairo_xlib_surface_get_xrender_format (cairo_surface_t *surface
);
Gets the X Render picture format that surface
uses for rendering with the
X Render extension. If the surface was created by
cairo_xlib_surface_create_with_xrender_format()
originally, the return
value is the format passed to that constructor.
the XRenderPictFormat* associated with surface
,
or NULL
if the surface is not an xlib surface
or if the X Render extension is not available.
Since: 1.6