-
public weak Image copy_to_image (Image image, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
Copies a portion of drawable into the client side image structure image. If
image is null, creates a new image of size width x height and copies into that.
See get_image for further details.
-
public virtual weak Surface create_cairo_surface (int width, int height)
-
public virtual weak GC create_gc (GCValues values, GCValuesMask mask)
-
public virtual void draw_arc (GC gc, bool filled, int x, int y, int width, int height, int angle1, int angle2)
-
public virtual void draw_drawable (GC gc, Drawable src, int xsrc, int ysrc, int xdest, int ydest, int width, int height)
-
public virtual void draw_glyphs (GC gc, Font font, int x, int y, GlyphString glyphs)
-
public virtual void draw_glyphs_transformed (GC gc, Matrix matrix, Font font, int x, int y, GlyphString glyphs)
-
public virtual void draw_image (GC gc, Image image, int xsrc, int ysrc, int xdest, int ydest, int width, int height)
-
public virtual void draw_lines (GC gc, Point[] points)
-
public virtual void draw_pixbuf (GC? gc, Pixbuf pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
-
public virtual void draw_points (GC gc, Point[] points)
-
public virtual void draw_polygon (GC gc, bool filled, Point[] points)
-
public virtual void draw_rectangle (GC gc, bool filled, int x, int y, int width, int height)
-
public virtual void draw_segments (GC gc, Segment[] segs)
-
public virtual void draw_text (Font font, GC gc, int x, int y, string text, int text_length)
-
public virtual void draw_text_wc (Font font, GC gc, int x, int y, WChar text, int text_length)
-
public virtual void draw_trapezoids (GC gc, Trapezoid[] trapezoids)
-
public virtual unowned Region get_clip_region ()
Computes the region of a drawable that potentially can be written to by drawing primitives. This
region will not take into account the clip region for the GC, and may also not take into account other factors such as if the window
is obscured by other windows, but no area outside of this region will be affected by drawing primitives.
-
public virtual weak Colormap get_colormap ()
Gets the colormap for drawable, if one is set; returns null otherwise.
-
public virtual weak Drawable get_composite_drawable (int x, int y, int width, int height, int composite_x_offset, int composite_y_offset)
-
public virtual int get_depth ()
Obtains the bit depth of the drawable, that is, the number of bits that make up a pixel in the
drawable's visual. Examples are 8 bits per pixel, 24 bits per pixel, etc.
-
public weak Display get_display ()
-
public virtual weak Image get_image (int x, int y, int width, int height)
A Image stores client-side image data (pixels). In
contrast, Pixmap and Window are server-side
objects. get_image obtains the pixels from a server-side drawable
as a client-side Image. The format of a Image
depends on the Visual of the current display, which makes manipulating
Image extremely difficult; therefore, in most cases you should use
pixbuf_get_from_drawable instead of this lower-level function. A
Pixbuf contains image data in a canonicalized RGB format, rather than
a display-dependent format. Of course, there's a convenience vs. speed tradeoff here, so you'll want to think about what makes sense
for your application.
-
public virtual weak Screen get_screen ()
-
public virtual void get_size (out int width, out int height)
Fills *@width and *@height with the size of drawable. width or height
can be null if you only want the other one.
-
public virtual weak Drawable get_source_drawable ()
-
public virtual unowned Region get_visible_region ()
Computes the region of a drawable that is potentially visible. This does not necessarily take into
account if the window is obscured by other windows, but no area outside of this region is visible.
-
public virtual weak Visual get_visual ()
Gets the Visual describing the pixel format of
drawable.
-
public virtual weak Surface ref_cairo_surface ()
-
public virtual void set_cairo_clip (Context cr)
-
public virtual void set_colormap (Colormap colormap)
Sets the colormap associated with drawable. Normally this will happen automatically when
the drawable is created; you only need to use this function if the drawable-creating function did not have a way to determine the
colormap, and you then use drawable operations that require a colormap. The colormap for all drawables and graphics contexts you
intend to use together should match. i.e. when using a GC to draw to a drawable, or copying
one drawable to another, the colormaps should match.