Drawable.drawDrawable

Warning gdk_draw_drawable has been deprecated since version 2.22 and should not be used in newly-written code. Use gdk_cairo_set_source_pixmap(), cairo_rectangle() and cairo_fill() to draw pixmap on top of other drawables. Also keep in mind that the limitations on allowed sources do not apply to Cairo. Copies the width x height region of src at coordinates (xsrc, ysrc) to coordinates (xdest, ydest) in drawable. width and/or height may be given as -1, in which case the entire src drawable will be copied. Most fields in gc are not used for this operation, but notably the clip mask or clip region will be honored. The source and destination drawables must have the same visual and colormap, or errors will result. (On X11, failure to match visual/colormap results in a BadMatch error from the X server.) A common cause of this problem is an attempt to draw a bitmap to a color drawable. The way to draw a bitmap is to set the bitmap as the stipple on the GdkGC, set the fill mode to GDK_STIPPLED, and then draw the rectangle.

class Drawable
void
drawDrawable
(,,
int xsrc
,
int ysrc
,
int xdest
,
int ydest
,
int width
,
int height
)

Parameters

gc GC

a GdkGC sharing the drawable's visual and colormap

src Drawable

the source GdkDrawable, which may be the same as drawable

xsrc int

X position in src of rectangle to draw

ysrc int

Y position in src of rectangle to draw

xdest int

X position in drawable where the rectangle should be drawn

ydest int

Y position in drawable where the rectangle should be drawn

width int

width of rectangle to draw, or -1 for entire src width

height int

height of rectangle to draw, or -1 for entire src height

Meta