GDK Reference Manualbuf : The pixel data, represented as 8-bit color indices. rowstride : The number of bytes from the start of one row in buf to the start of the next. cmap : The GdkRgbCmap used to assign colors to the color indices.
Draws a grayscale image in the drawable. drawable : The GdkDrawable to draw in (usually a GdkWindow). gc : The graphics context. x : The x coordinate of the top-left corner in the drawable. y : The y coordinate of the top-left corner in the drawable. width : The width of the rectangle to be drawn. height : The height of the rectangle to be drawn. dith : A GdkRgbDither value, selecting the desired dither mode. buf : The pixel data, represented as 8-bit gray values. rowstride : The number of bytes from the start of one row in buf to the start of the next.
Draws a padded RGB image in the drawable. The image is stored as one pixel per 32-bit word. It is laid out as a red byte, a green byte, a blue byte, and a padding byte. It's unlikely that this function will give significant performance gains in practice. In my experience, the performance gain from having pixels aligned to 32-bit boundaries is cancelled out by the increased memory bandwidth. drawable : The GdkDrawable to draw in (usually a GdkWindow). gc : The graphics context. x : The x coordinate of the top-left corner in the drawable. y : The y coordinate of the top-left corner in the drawable. width : The width of the rectangle to be drawn. height : The height of the rectangle to be drawn. dith : A GdkRgbDither value, selecting the desired dither mode. buf : The pixel data, represented as padded 32-bit data. rowstride : The number of bytes from the start of one row in buf to the start of the next. enum GdkRgbDither
Selects whether or not GdkRgb applies dithering to the image on display. There are three values: GDK_RGB_DITHER_NONE: Never use dithering. GDK_RGB_DITHER_NORMAL: Use dithering in 8 bits per pixel (and below) only. GDK_RGB_DITHER_MAX: Use dithering in 16 bits per pixel and below. Since GdkRgb currently only handles images with 8 bits per component, dithering on 24 bit per pixel displays is a moot point.
Creates a new GdkRgbCmap structure. The cmap maps color indexes to RGB colors. If n_colors is less than 256, then images containing color values greater than or equal to n_colors will produce undefined results, including possibly segfaults. colors : The colors, represented as 0xRRGGBB integer values. n_colors : The number of colors in the cmap. Returns : The newly created GdkRgbCmap
Frees the memory associated with a GdkRgbCmap created by gdk_rgb_cmap_new(). cmap : The GdkRgbCmap to free. struct GdkRgbCmap
A private data structure which maps color indices to actual RGB colors. This is used only for gdk_draw_indexed_image().
Sets the foreground color in gc to the specified color (or the closest approximation, in the case of limited visuals). gc : The GdkGC to modify. rgb : The color, represented as a 0xRRGGBB integer value. 上一篇:GTK v1.2 Tutorial(英文) 下一篇:Java入门(12) 事件与错误处理 更多相关文章
|
推荐文章
精彩文章
|