Drawable.drawPixbuf

Warning gdk_draw_pixbuf has been deprecated since version 2.22 and should not be used in newly-written code. Use gdk_cairo_set_source_pixbuf() and cairo_paint() or cairo_rectangle() and cairo_fill() instead. Renders a rectangular portion of a pixbuf to a drawable. The destination drawable must have a colormap. All windows have a colormap, however, pixmaps only have colormap by default if they were created with a non-NULL window argument. Otherwise a colormap must be set on them with gdk_drawable_set_colormap(). On older X servers, rendering pixbufs with an alpha channel involves round trips to the X server, and may be somewhat slow. If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf function is accelerated using mediaLib, which provides hardware acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib support can be turned off by setting the GDK_DISABLE_MEDIALIB environment variable. Since 2.2

  1. void drawPixbuf(Pixbuf pixbuf, int destX, int destY)
  2. void drawPixbuf(GC gc, Pixbuf pixbuf, int destX, int destY)
  3. void drawPixbuf(GC gc, Pixbuf pixbuf, int srcX, int srcY, int destX, int destY, int width, int height, GdkRgbDither dither, int xDither, int yDither)
    class Drawable
    void
    drawPixbuf

Parameters

gc GC

a GdkGC, used for clipping, or NULL. [allow-none]

pixbuf Pixbuf

a GdkPixbuf

srcX int

Source X coordinate within pixbuf.

srcY int

Source Y coordinates within pixbuf.

destX int

Destination X coordinate within drawable.

destY int

Destination Y coordinate within drawable.

width int

Width of region to render, in pixels, or -1 to use pixbuf width.

height int

Height of region to render, in pixels, or -1 to use pixbuf height.

dither GdkRgbDither

Dithering mode for GdkRGB.

xDither int

X offset for dither.

yDither int

Y offset for dither.

Meta