gdk-Images: Images

Description Methods and Functions Detailed Description Structures Convenient Construction Enums and Flags Author(s) References

Description

A client-side area for bit-mapped graphics

Methods and Functions

gdkImageNew(type, visual, width, height)
gdkImageGet(object, x, y, width, height)
gdkImageGetColormap(object)
gdkImageSetColormap(object, colormap)
gdkImagePutPixel(object, x, y, pixel)
gdkImageGetPixel(object, x, y)
gdkImage(type, visual, width, height)

Detailed Description

The GdkImage type represents an area for drawing graphics. It has now been superceded to a large extent by the much more flexible GdkRGB functions.

To create an empty GdkImage use gdkImageNew. To create a GdkImage from bitmap data use gdkImageNewBitmap(). To create an image from part of a GdkWindow use gdkDrawableGetImage.

The image can be manipulated with gdkImageGetPixel and gdkImagePutPixel, or alternatively by changing the actual pixel data. Though manipulating the pixel data requires complicated code to cope with the different formats that may be used.

To draw a GdkImage in a GdkWindow or GdkPixmap use gdkDrawImage.

To destroy a GdkImage use gdkImageDestroy().

Structures

GdkImage

The GdkImage struct contains information on the image and the pixel data.

type

[GdkImageType] the parent instance

visual

[GdkVisual] the type of the image.

byteOrder

[GdkByteOrder] the visual.

width

[integer] the byte order.

height

[integer] the width of the image in pixels.

depth

[integer] the height of the image in pixels.

bpp

[integer] the depth of the image, i.e. the number of bits per pixel.

bpl

[integer] the number of bytes per pixel.

bitsPerPixel

[integer] the number of bytes per line of the image.

mem

[raw] the number of bits per pixel.

colormap

[GdkColormap] the pixel data.

Convenient Construction

gdkImage is the equivalent of gdkImageNew.

Enums and Flags

GdkImageType

Specifies the type of a GdkImage.

normal

The original X image type, which is quite slow since the image has to be transferred from the client to the server to display it.

shared

A faster image type, which uses shared memory to transfer the image data between client and server. However this will only be available if client and server are on the same machine and the shared memory extension is supported by the server.

fastest

Specifies that GDK_IMAGE_SHARED should be tried first, and if that fails then GDK_IMAGE_NORMAL will be used.

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://developer.gnome.org/gdk2/stable/gdk2-Images.html


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.

Related to gdk-Images in RGtk2...