Logo Search packages:      
Sourcecode: ardour version File versions

void Gdk::Drawable::draw_drawable ( const Glib::RefPtr< const GC > &  gc,
const Glib::RefPtr< const Drawable > &  src,
int  xsrc,
int  ysrc,
int  xdest,
int  ydest,
int  width = -1,
int  height = -1 
) [inherited]

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 a clip mask on your Gdk::GC, then use gdk_draw_rectangle() to draw a rectangle clipped to the bitmap.

Parameters:
gc A Gdk::GC sharing the drawable's visual and colormap.
src The source Gdk::Drawable, which may be the same as drawable .
xsrc X position in src of rectangle to draw.
ysrc Y position in src of rectangle to draw.
xdest X position in drawable where the rectangle should be drawn.
ydest Y position in drawable where the rectangle should be drawn.
width Width of rectangle to draw, or -1 for entire src width.
height Height of rectangle to draw, or -1 for entire src height.

Definition at line 236 of file drawable.cc.

References Gdk::Drawable::gobj().

{
  gdk_draw_drawable(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(src)), xsrc, ysrc, xdest, ydest, width, height);
}


Generated by  Doxygen 1.6.0   Back to index