![]() |
![]() |
It has now been superceded to a large extent by the much more flexible Gdk::Drawable RGB functions. To create an image from part of a Gdk::Window use Gdk::Drawable::get_image().
The image can be manipulated with get_pixel() and 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 Gdk::Image in a Gdk::Window or Gdk::Pixmap use Gdk::Drawable::draw_image().
Public Member Functions | |
guint16 | get_bits_per_pixel () const |
guint16 | get_bpl () const |
guint16 | get_bpp () const |
ByteOrder | get_byte_order () const |
Glib::RefPtr<const Colormap> | get_colormap () const |
Retrieves the colormap for a given image, if it exists. | |
Glib::RefPtr<Colormap> | get_colormap () |
Retrieves the colormap for a given image, if it exists. | |
int | get_height () const |
ImageType | get_image_type () const |
const void* | get_mem () const |
void* | get_mem () |
guint32 | get_pixel (int x, int y) const |
Glib::RefPtr<const Visual> | get_visual () const |
Glib::RefPtr<Visual> | get_visual () |
int | get_width () const |
void* | get_windowing_data () const |
const GdkImage* | gobj () const |
Provides access to the underlying C GObject. | |
GdkImage* | gobj () |
Provides access to the underlying C GObject. | |
GdkImage* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
void | put_pixel (int x, int y, guint32 pixel) |
void | set_colormap (const Glib::RefPtr<Colormap>& colormap) |
Sets the colormap for the image to the given colormap. | |
virtual | ~Image () |
Static Public Member Functions | |
static Glib::RefPtr<Image> | create (ImageType type, const Glib::RefPtr<Visual>& visual, int width, int height) |
Protected Member Functions | |
Image (ImageType type, const Glib::RefPtr<Visual>& visual, int width, int height) | |
Instantiate a new Gdk::Image. | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Gdk::Image> | wrap (GdkImage* object, bool take_copy=false) |
|
|
|
Instantiate a new Gdk::Image.
|
|
|
|
|
|
|
|
|
|
|
|
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 set_colormap().
|
|
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 set_colormap().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase. |
|
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase. |
|
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
|
|
|
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.
|
|
|