If you want to draw to the screen within an application that uses the X Window system, you should use this Surface type.
Public Member Functions | |
int | get_depth () const |
Get the number of bits used to represent each pixel value. | |
Display * | get_display () |
Get the X Display for the underlying X Drawable. | |
const Display * | get_display () const |
Get the X Display for the underlying X Drawable. | |
Drawable | get_drawable () const |
gets the Drawable object associated with this surface | |
int | get_height () const |
Get the height in pixels of the X Drawable underlying the surface. | |
const Screen * | get_screen () const |
Get the X Screen for the underlying X Drawable. | |
Screen * | get_screen () |
Get the X Screen for the underlying X Drawable. | |
const Visual * | get_visual () const |
Get the X Visual for the underlying X Drawable. | |
Visual * | get_visual () |
Get the X Visual for the underlying X Drawable. | |
int | get_width () const |
Get the width in pixels of the X Drawable underlying the surface. | |
void | set_drawable (Drawable drawable, int width, int height) |
Informs cairo of a new X Drawable underlying the surface. | |
void | set_size (int width, int height) |
Informs cairo of the new size of the X Drawable underlying the surface. | |
XlibSurface (cairo_surface_t *cobject, bool has_reference=false) | |
Create a C++ wrapper for the C instance. | |
virtual | ~XlibSurface () |
Static Public Member Functions | |
static RefPtr< XlibSurface > | create (Display *dpy, Pixmap bitmap, Screen *screen, int width, int height) |
Creates an Xlib surface that draws to the given bitmap. | |
static RefPtr< XlibSurface > | create (Display *dpy, Drawable drawable, Visual *visual, int width, int height) |
Creates an Xlib surface that draws to the given drawable. |
|
Create a C++ wrapper for the C instance. This C++ instance should then be given to a RefPtr.
|
|
|
|
Creates an Xlib surface that draws to the given bitmap. This will be drawn to as a CAIRO_FORMAT_A1 object.
|
|
Creates an Xlib surface that draws to the given drawable. The way that colors are represented in the drawable is specified by the provided visual.
|
|
Get the number of bits used to represent each pixel value.
|
|
Get the X Display for the underlying X Drawable.
|
|
Get the X Display for the underlying X Drawable.
|
|
gets the Drawable object associated with this surface
|
|
Get the height in pixels of the X Drawable underlying the surface.
|
|
Get the X Screen for the underlying X Drawable.
|
|
Get the X Screen for the underlying X Drawable.
|
|
Get the X Visual for the underlying X Drawable.
|
|
Get the X Visual for the underlying X Drawable.
|
|
Get the width in pixels of the X Drawable underlying the surface.
|
|
Informs cairo of a new X Drawable underlying the surface. The drawable must match the display, screen and format of the existing drawable or the application will get X protocol errors and will probably terminate. No checks are done by this function to ensure this compatibility.
|
|
Informs cairo of the new size of the X Drawable underlying the surface. For a surface created for a Window (rather than a Pixmap), this function must be called each time the size of the window changes. (For a subwindow, you are normally resizing the window yourself, but for a toplevel window, it is necessary to listen for ConfigureNotify events.) A Pixmap can never change size, so it is never necessary to call this function on a surface created for a Pixmap.
|