Learn R Programming

RGtk2 (version 2.8.7)

gdkDrawRgbImage: gdkDrawRgbImage

Description

Draws an RGB image in the drawable. This is the core GdkRGB function, and likely the only one you will need to use.

Usage

gdkDrawRgbImage(object, gc, x, y, width, height, dith, rgb.buf, rowstride)

Arguments

Details

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].