XLib-XRender Backend
XLib-XRender Backend — X Window System rendering using XLib and the X Render extension
|
|
Description
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.
Functions
cairo_xlib_surface_create_with_xrender_format ()
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.
Returns
the newly created surface
Since: 1.0
cairo_xlib_surface_get_xrender_format ()
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.
Returns
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
Types and Values
CAIRO_HAS_XLIB_XRENDER_SURFACE
#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1
Defined if the XLib/XRender surface functions are available.
This macro can be used to conditionally compile backend-specific code.
Since: 1.6