jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: XLib-XRender Backend: Cairo: A Vector Graphics Library jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68:
jpayne@68:

XLib-XRender Backend

jpayne@68:

XLib-XRender Backend — X Window System rendering using XLib and the X Render extension

jpayne@68:
jpayne@68:
jpayne@68:

Functions

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:
jpayne@68: cairo_surface_t * jpayne@68: jpayne@68: cairo_xlib_surface_create_with_xrender_format () jpayne@68:
jpayne@68: XRenderPictFormat * jpayne@68: jpayne@68: cairo_xlib_surface_get_xrender_format () jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

Types and Values

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:
#defineCAIRO_HAS_XLIB_XRENDER_SURFACE
jpayne@68:
jpayne@68:
jpayne@68:

Description

jpayne@68:

The XLib surface is used to render cairo graphics to X Window System jpayne@68: windows and pixmaps using the XLib and Xrender libraries.

jpayne@68:

Note that the XLib surface automatically takes advantage of X Render extension jpayne@68: if it is available.

jpayne@68:
jpayne@68:
jpayne@68:

Functions

jpayne@68:
jpayne@68:

cairo_xlib_surface_create_with_xrender_format ()

jpayne@68:
cairo_surface_t *
jpayne@68: cairo_xlib_surface_create_with_xrender_format
jpayne@68:                                (Display *dpy,
jpayne@68:                                 Drawable drawable,
jpayne@68:                                 Screen *screen,
jpayne@68:                                 XRenderPictFormat *format,
jpayne@68:                                 int width,
jpayne@68:                                 int height);
jpayne@68:

Creates an Xlib surface that draws to the given drawable. jpayne@68: The way that colors are represented in the drawable is specified jpayne@68: by the provided picture format.

jpayne@68:

Note: If drawable jpayne@68: is a Window, then the function jpayne@68: cairo_xlib_surface_set_size() must be called whenever the size of the jpayne@68: window changes.

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dpy

an X Display

 

drawable

an X Drawable, (a Pixmap or a Window)

 

screen

the X Screen associated with drawable jpayne@68:

 

format

the picture format to use for drawing to drawable jpayne@68: . The depth jpayne@68: of format jpayne@68: must match the depth of the drawable.

 

width

the current width of drawable jpayne@68: .

 

height

the current height of drawable jpayne@68: .

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

the newly created surface

jpayne@68:
jpayne@68:

Since: 1.0

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_xlib_surface_get_xrender_format ()

jpayne@68:
XRenderPictFormat *
jpayne@68: cairo_xlib_surface_get_xrender_format (cairo_surface_t *surface);
jpayne@68:

Gets the X Render picture format that surface jpayne@68: uses for rendering with the jpayne@68: X Render extension. If the surface was created by jpayne@68: cairo_xlib_surface_create_with_xrender_format() originally, the return jpayne@68: value is the format passed to that constructor.

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

surface

an xlib surface

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

the XRenderPictFormat* associated with surface jpayne@68: , jpayne@68: or NULL if the surface is not an xlib surface jpayne@68: or if the X Render extension is not available.

jpayne@68:
jpayne@68:

Since: 1.6

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

Types and Values

jpayne@68:
jpayne@68:

CAIRO_HAS_XLIB_XRENDER_SURFACE

jpayne@68:
#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1
jpayne@68: 
jpayne@68:

Defined if the XLib/XRender surface functions are available. jpayne@68: This macro can be used to conditionally compile backend-specific code.

jpayne@68:

Since: 1.6

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

See Also

jpayne@68:

cairo_surface_t

jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68: