|  |  |  | Cairo: A Vector Graphics Library |  | 
|---|---|---|---|---|
| Top | Description | ||||
| XLib-XRender BackendXLib-XRender Backend — X Window System rendering using XLib and the X Render extension | 
#define CAIRO_HAS_XLIB_XRENDER_SURFACE cairo_surface_t * cairo_xlib_surface_create_with_xrender_format (Display *dpy,Drawable drawable,Screen *screen,XRenderPictFormat *format,int width,int height); XRenderPictFormat * cairo_xlib_surface_get_xrender_format (cairo_surface_t *surface);
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.
#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
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.
| 
 | an X Display | 
| 
 | an X Drawable, (a Pixmap or a Window) | 
| 
 | the X Screen associated with drawable | 
| 
 | the picture format to use for drawing to drawable. The depth
offormatmust match the depth of the drawable. | 
| 
 | the current width of drawable. | 
| 
 | the current height of drawable. | 
| Returns : | the newly created surface | 
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.
| 
 | an xlib surface | 
| Returns : | the XRenderPictFormat* associated with surface,
orNULLif the surface is not an xlib surface
or if the X Render extension is not available. | 
Since 1.6