Gdk.Pixbuf.RenderToDrawable Method
Renders the image into a Drawable

Syntax

public void RenderToDrawable (Drawable drawable, GC gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)

Parameters

drawable
Destination drawable.
gc
GC used for rendering.
src_x
Source X coordinate within pixbuf.
src_y
Source Y coordinate within pixbuf.
dest_x
Destination X coordinate within drawable.
dest_y
Destination Y coordinate within drawable.
width
Width of region to render, in pixels, or -1 to use pixbuf width
height
Height of region to render, in pixels, or -1 to use pixbuf height
dither
Dithering mode for GdkRGB.
x_dither
X offset for dither.
y_dither
Y offset for dither.

Remarks

Renders a rectangular portion of the Pixbuf into the drawable while using the specified gc. This is done using GdkRGB, so the specified drawable must have the Gdk.RGB visual and colormap. Note that this function will ignore the opacity information for images with an alpha channel; the GC must already have the clipping mask set if you want transparent regions to show through.

For an explanation of dither offsets, see the GdkRGB documentation. In brief, the dither offset is important when re-rendering partial regions of an image to a rendered version of the full image, or for when the offsets to a base position change, as in scrolling. The dither matrix has to be shifted for consistent visual results. If you do not have any of these cases, the dither offsets can be both zero.

Requirements

Namespace: Gdk
Assembly: gdk-sharp (in gdk-sharp.dll)