jpayne@68: jpayne@68: jpayne@68:
jpayne@68: jpayne@68:jpayne@68: Top jpayne@68: | jpayne@68:![]() |
jpayne@68: ![]() |
jpayne@68: ![]() |
jpayne@68: ![]() |
jpayne@68:
jpayne@68: XLib Surfacesjpayne@68:XLib Surfaces — X Window System rendering using XLib jpayne@68: |
jpayne@68: jpayne@68: |
jpayne@68: cairo_surface_t * jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_create () jpayne@68: | jpayne@68:
jpayne@68: cairo_surface_t * jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_create_for_bitmap () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_set_size () jpayne@68: | jpayne@68:
jpayne@68: Display * jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_get_display () jpayne@68: | jpayne@68:
jpayne@68: Screen * jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_get_screen () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_set_drawable () jpayne@68: | jpayne@68:
jpayne@68: Drawable jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_get_drawable () jpayne@68: | jpayne@68:
jpayne@68: Visual * jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_get_visual () jpayne@68: | jpayne@68:
jpayne@68: int jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_get_width () jpayne@68: | jpayne@68:
jpayne@68: int jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_get_height () jpayne@68: | jpayne@68:
jpayne@68: int jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_surface_get_depth () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_device_debug_cap_xrender_version () jpayne@68: | jpayne@68:
jpayne@68: int jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_device_debug_get_precision () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xlib_device_debug_set_precision () jpayne@68: | jpayne@68:
#define | jpayne@68:CAIRO_HAS_XLIB_SURFACE | jpayne@68:
The XLib surface is used to render cairo graphics to X Window System jpayne@68: windows and pixmaps using the XLib library.
jpayne@68:Note that the XLib surface automatically takes advantage of X render extension jpayne@68: if it is available.
jpayne@68:cairo_surface_t * jpayne@68: cairo_xlib_surface_create (jpayne@68:Display *dpy
, jpayne@68:Drawable drawable
, jpayne@68:Visual *visual
, jpayne@68:int width
, jpayne@68:int height
);
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 visual.
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.
When drawable
jpayne@68: is a Window containing child windows then drawing to
jpayne@68: the created surface will be clipped by those child windows. When
jpayne@68: the created surface is used as a source, the contents of the
jpayne@68: children will be included.
dpy |
jpayne@68: an X Display |
jpayne@68: jpayne@68: |
drawable |
jpayne@68: an X Drawable, (a Pixmap or a Window) |
jpayne@68: jpayne@68: |
visual |
jpayne@68: the visual to use for drawing to |
jpayne@68: jpayne@68: |
width |
jpayne@68: the current width of |
jpayne@68: jpayne@68: |
height |
jpayne@68: the current height of |
jpayne@68: jpayne@68: |
Since: 1.0
jpayne@68:cairo_surface_t * jpayne@68: cairo_xlib_surface_create_for_bitmap (jpayne@68:Display *dpy
, jpayne@68:Pixmap bitmap
, jpayne@68:Screen *screen
, jpayne@68:int width
, jpayne@68:int height
);
Creates an Xlib surface that draws to the given bitmap.
jpayne@68: This will be drawn to as a CAIRO_FORMAT_A1
object.
dpy |
jpayne@68: an X Display |
jpayne@68: jpayne@68: |
bitmap |
jpayne@68: an X Drawable, (a depth-1 Pixmap) |
jpayne@68: jpayne@68: |
screen |
jpayne@68: the X Screen associated with |
jpayne@68: jpayne@68: |
width |
jpayne@68: the current width of |
jpayne@68: jpayne@68: |
height |
jpayne@68: the current height of |
jpayne@68: jpayne@68: |
Since: 1.0
jpayne@68:void jpayne@68: cairo_xlib_surface_set_size (jpayne@68:cairo_surface_t *surface
, jpayne@68:int width
, jpayne@68:int height
);
Informs cairo of the new size of the X Drawable underlying the jpayne@68: surface. For a surface created for a Window (rather than a Pixmap), jpayne@68: this function must be called each time the size of the window jpayne@68: changes. (For a subwindow, you are normally resizing the window jpayne@68: yourself, but for a toplevel window, it is necessary to listen for jpayne@68: ConfigureNotify events.)
jpayne@68:A Pixmap can never change size, so it is never necessary to call jpayne@68: this function on a surface created for a Pixmap.
jpayne@68:surface |
jpayne@68: a cairo_surface_t for the XLib backend |
jpayne@68: jpayne@68: |
width |
jpayne@68: the new width of the surface |
jpayne@68: jpayne@68: |
height |
jpayne@68: the new height of the surface |
jpayne@68: jpayne@68: |
Since: 1.0
jpayne@68:Display *
jpayne@68: cairo_xlib_surface_get_display (cairo_surface_t *surface
);
jpayne@68: Get the X Display for the underlying X Drawable.
jpayne@68:surface |
jpayne@68: a cairo_xlib_surface_t |
jpayne@68: jpayne@68: |
Since: 1.2
jpayne@68:Screen *
jpayne@68: cairo_xlib_surface_get_screen (cairo_surface_t *surface
);
jpayne@68: Get the X Screen for the underlying X Drawable.
jpayne@68:surface |
jpayne@68: a cairo_xlib_surface_t |
jpayne@68: jpayne@68: |
Since: 1.2
jpayne@68:void jpayne@68: cairo_xlib_surface_set_drawable (jpayne@68:cairo_surface_t *surface
, jpayne@68:Drawable drawable
, jpayne@68:int width
, jpayne@68:int height
);
Informs cairo of a new X Drawable underlying the jpayne@68: surface. The drawable must match the display, screen jpayne@68: and format of the existing drawable or the application jpayne@68: will get X protocol errors and will probably terminate. jpayne@68: No checks are done by this function to ensure this jpayne@68: compatibility.
jpayne@68:surface |
jpayne@68: a cairo_surface_t for the XLib backend |
jpayne@68: jpayne@68: |
drawable |
jpayne@68: the new drawable for the surface |
jpayne@68: jpayne@68: |
width |
jpayne@68: the width of the new drawable |
jpayne@68: jpayne@68: |
height |
jpayne@68: the height of the new drawable |
jpayne@68: jpayne@68: |
Since: 1.0
jpayne@68:Drawable
jpayne@68: cairo_xlib_surface_get_drawable (cairo_surface_t *surface
);
jpayne@68: Get the underlying X Drawable used for the surface.
jpayne@68:surface |
jpayne@68: a cairo_xlib_surface_t |
jpayne@68: jpayne@68: |
Since: 1.2
jpayne@68:Visual *
jpayne@68: cairo_xlib_surface_get_visual (cairo_surface_t *surface
);
jpayne@68: Gets the X Visual associated with surface
jpayne@68: , suitable for use with the
jpayne@68: underlying X Drawable. If surface
jpayne@68: was created by
jpayne@68: cairo_xlib_surface_create()
, the return value is the Visual passed to that
jpayne@68: constructor.
surface |
jpayne@68: a cairo_xlib_surface_t |
jpayne@68: jpayne@68: |
the Visual or NULL
if there is no appropriate Visual for
jpayne@68: surface
jpayne@68: .
Since: 1.2
jpayne@68:int
jpayne@68: cairo_xlib_surface_get_width (cairo_surface_t *surface
);
jpayne@68: Get the width of the X Drawable underlying the surface in pixels.
jpayne@68:surface |
jpayne@68: a cairo_xlib_surface_t |
jpayne@68: jpayne@68: |
Since: 1.2
jpayne@68:int
jpayne@68: cairo_xlib_surface_get_height (cairo_surface_t *surface
);
jpayne@68: Get the height of the X Drawable underlying the surface in pixels.
jpayne@68:surface |
jpayne@68: a cairo_xlib_surface_t |
jpayne@68: jpayne@68: |
Since: 1.2
jpayne@68:int
jpayne@68: cairo_xlib_surface_get_depth (cairo_surface_t *surface
);
jpayne@68: Get the number of bits used to represent each pixel value.
jpayne@68:surface |
jpayne@68: a cairo_xlib_surface_t |
jpayne@68: jpayne@68: |
Since: 1.2
jpayne@68:void jpayne@68: cairo_xlib_device_debug_cap_xrender_version jpayne@68: (jpayne@68:cairo_device_t *device
, jpayne@68:int major_version
, jpayne@68:int minor_version
);
Restricts all future Xlib surfaces for this devices to the specified version jpayne@68: of the RENDER extension. This function exists solely for debugging purpose. jpayne@68: It lets you find out how cairo would behave with an older version of jpayne@68: the RENDER extension.
jpayne@68:Use the special values -1 and -1 for disabling the RENDER extension.
jpayne@68:device |
jpayne@68: a cairo_device_t for the Xlib backend |
jpayne@68: jpayne@68: |
major_version |
jpayne@68: major version to restrict to |
jpayne@68: jpayne@68: |
minor_version |
jpayne@68: minor version to restrict to |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:int
jpayne@68: cairo_xlib_device_debug_get_precision (cairo_device_t *device
);
jpayne@68: Get the Xrender precision mode.
jpayne@68:device |
jpayne@68: a cairo_device_t for the Xlib backend |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:void jpayne@68: cairo_xlib_device_debug_set_precision (jpayne@68:cairo_device_t *device
, jpayne@68:int precision
);
Render supports two modes of precision when rendering trapezoids. Set jpayne@68: the precision to the desired mode.
jpayne@68:device |
jpayne@68: a cairo_device_t for the Xlib backend |
jpayne@68: jpayne@68: |
precision |
jpayne@68: the precision to use |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68: