ImageGdk

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 gdk_image_new(). To create a GdkImage from bitmap data use gdk_image_new_bitmap(). To create an image from part of a GdkWindow use gdk_drawable_get_image(). The image can be manipulated with gdk_image_get_pixel() and gdk_image_put_pixel(), 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 gdk_draw_image(). To destroy a GdkImage use gdk_image_destroy().

Constructors

this
this(GdkImage* gdkImage)

Sets our main struct and passes it to the parent class

this
this(GdkImageType type, Visual visual, int width, int height)

Warning gdk_image_new is deprecated and should not be used in newly-written code. Creates a new GdkImage.

this
this(Visual visual, void* data, int width, int height)

Warning gdk_image_new_bitmap is deprecated and should not be used in newly-written code. Creates a new GdkImage with a depth of 1 from the given data. Warning THIS FUNCTION IS INCREDIBLY BROKEN. The passed-in data must be allocated by malloc() (NOT g_malloc()) and will be freed when the image is freed.

Members

Functions

doref
ImageGdk doref()

Warning gdk_image_ref has been deprecated since version 2.0 and should not be used in newly-written code. Use g_object_ref() instead. Deprecated function; use g_object_ref() instead.

getBitsPerPixel
ushort getBitsPerPixel()

Warning gdk_image_get_bits_per_pixel has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the number of bits per pixel of the image. Since 2.22

getByteOrder
GdkByteOrder getByteOrder()

Warning gdk_image_get_byte_order has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the byte order of the image. Since 2.22

getBytesPerLine
ushort getBytesPerLine()

Warning gdk_image_get_bytes_per_line has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the number of bytes per line of the image. Since 2.22

getBytesPerPixel
ushort getBytesPerPixel()

Warning gdk_image_get_bytes_per_pixel has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the number of bytes per pixel of the image. Since 2.22

getColormap
Colormap getColormap()

Warning gdk_image_get_colormap has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Retrieves the colormap for a given image, if it exists. An image will have a colormap if the drawable from which it was created has a colormap, or if a colormap was set explicitely with gdk_image_set_colormap().

getDepth
ushort getDepth()

Warning gdk_image_get_depth has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the depth of the image. Since 2.22

getHeight
int getHeight()

Warning gdk_image_get_height has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the height of the image. Since 2.22

getImageGdkStruct
GdkImage* getImageGdkStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getImageType
GdkImageType getImageType()

Warning gdk_image_get_image_type has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the type of a given image. Since 2.22

getPixel
uint getPixel(int x, int y)

Warning gdk_image_get_pixel is deprecated and should not be used in newly-written code. Gets a pixel value at a specified position in a GdkImage.

getPixels
void* getPixels()

Warning gdk_image_get_pixels has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Returns a pointer to the pixel data of the image. Since 2.22

getStruct
void* getStruct()

the main Gtk struct as a void*

getVisual
Visual getVisual()

Warning gdk_image_get_visual has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the visual that was used to create the image. Since 2.22

getWidth
int getWidth()

Warning gdk_image_get_width has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Determines the width of the image. Since 2.22

putPixel
void putPixel(int x, int y, uint pixel)

Warning gdk_image_put_pixel is deprecated and should not be used in newly-written code. Sets a pixel in a GdkImage to a given pixel value.

setColormap
void setColormap(Colormap colormap)

Warning gdk_image_set_colormap has been deprecated since version 2.22 and should not be used in newly-written code. GdkImage should not be used anymore. Sets the colormap for the image to the given colormap. Normally there's no need to use this function, images are created with the correct colormap if you get the image from a drawable. If you create the image from scratch, use the colormap of the drawable you intend to render the image to.

unref
void unref()

Warning gdk_image_unref has been deprecated since version 2.0 and should not be used in newly-written code. Use g_object_unref() instead. Deprecated function; use g_object_unref() instead.

Static functions

get
ImageGdk get(Drawable drawable, int x, int y, int width, int height)

Warning gdk_image_get is deprecated and should not be used in newly-written code. This is a deprecated wrapper for gdk_drawable_get_image(); gdk_drawable_get_image() should be used instead. Or even better: in most cases gdk_pixbuf_get_from_drawable() is the most convenient choice.

Variables

gdkImage
GdkImage* gdkImage;

the main Gtk struct

Meta