RGB.drawRgbImage

Warning gdk_draw_rgb_image is deprecated and should not be used in newly-written code. Draws an RGB image in the drawable. This is the core GdkRGB function, and likely the only one you will need to use. The rowstride parameter allows for lines to be aligned more flexibly. For example, lines may be allocated to begin on 32-bit boundaries, even if the width of the rectangle is odd. Rowstride is also useful when drawing a subrectangle of a larger image in memory. Finally, to replicate the same line a number of times, the trick of setting rowstride to 0 is allowed. In general, for 0 <= i < width and 0 <= j < height, the pixel (x + i, y + j) is colored with red value rgb_buf[j * rowstride + i * 3], green value rgb_buf[j * rowstride + i * 3 + 1], and blue value rgb_buf[j * rowstride + i * 3 + 2].

class RGB
static
void
drawRgbImage

Parameters

drawable Drawable

The GdkDrawable to draw in (usually a GdkWindow).

gc GC

The graphics context (all GDK drawing operations require one; its contents are ignored).

x int

The x coordinate of the top-left corner in the drawable.

y int

The y coordinate of the top-left corner in the drawable.

width int

The width of the rectangle to be drawn.

height int

The height of the rectangle to be drawn.

dith GdkRgbDither

A GdkRgbDither value, selecting the desired dither mode.

rgbBuf char*

The pixel data, represented as packed 24-bit data.

rowstride int

The number of bytes from the start of one row in rgb_buf to the start of the next.

Meta