Ardour  8.7-14-g57a6773833
Gdk::Image Class Reference

#include <image.h>

Inheritance diagram for Gdk::Image:
[legend]

Public Member Functions

virtual ~Image ()
 
GdkImagegobj ()
 Provides access to the underlying C GObject. More...
 
const GdkImagegobj () const
 Provides access to the underlying C GObject. More...
 
GdkImagegobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
void put_pixel (int x, int y, guint32 pixel)
 
guint32 get_pixel (int x, int y) const
 
void set_colormap (const Glib::RefPtr< Colormap > &colormap)
 
Glib::RefPtr< Colormapget_colormap ()
 
Glib::RefPtr< const Colormapget_colormap () const
 
ImageType get_image_type () const
 
Glib::RefPtr< Visualget_visual ()
 
Glib::RefPtr< const Visualget_visual () const
 
ByteOrder get_byte_order () const
 
int get_width () const
 
int get_height () const
 
guint16 get_depth () const
 
guint16 get_bpp () const
 
guint16 get_bytes_per_pixel () const
 
guint16 get_bpl () const
 
guint16 get_bytes_per_line () const
 
guint16 get_bits_per_pixel () const
 
void * get_pixels ()
 
const void * get_pixels () const
 
void * get_mem ()
 
const void * get_mem () const
 
void * get_windowing_data () const
 

Static Public Member Functions

static GType get_type () G_GNUC_CONST
 
static Glib::RefPtr< Imagecreate (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)
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gdk::Imagewrap (GdkImage *object, bool take_copy=false)
 

Detailed Description

This represents an area for drawing graphics. 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().

Definition at line 95 of file tk/ydkmm/ydkmm/gdkmm/image.h.

Constructor & Destructor Documentation

◆ ~Image()

virtual Gdk::Image::~Image ( )
virtual

◆ Image()

Gdk::Image::Image ( ImageType  type,
const Glib::RefPtr< Visual > &  visual,
int  width,
int  height 
)
protected

Instantiate a new Gdk::Image.

Parameters
typeThe type of the Gdk::Image. Gdk::IMAGE_FASTEST is probably the best choice, since it will try to create a Gdk::IMAGE_SHARED image first and if that fails it will then use Gdk::IMAGE_NORMAL.
visualThe Gdk::Visual to use for the image.
widthThe width of the image in pixels.
heightThe height of the image in pixels.

Member Function Documentation

◆ create()

static Glib::RefPtr<Image> Gdk::Image::create ( ImageType  type,
const Glib::RefPtr< Visual > &  visual,
int  width,
int  height 
)
static

◆ get_bits_per_pixel()

guint16 Gdk::Image::get_bits_per_pixel ( ) const

Determines the number of bits per pixel of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The bits per pixel.

◆ get_bpl()

guint16 Gdk::Image::get_bpl ( ) const

Determines the number of bytes per line of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The bytes per line.

◆ get_bpp()

guint16 Gdk::Image::get_bpp ( ) const

Determines the number of bytes per pixel of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The bytes per pixel.

◆ get_byte_order()

ByteOrder Gdk::Image::get_byte_order ( ) const

Determines the byte order of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
A Gdk::Visual.

◆ get_bytes_per_line()

guint16 Gdk::Image::get_bytes_per_line ( ) const

Determines the number of bytes per line of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The bytes per line.

◆ get_bytes_per_pixel()

guint16 Gdk::Image::get_bytes_per_pixel ( ) const

Determines the number of bytes per pixel of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The bytes per pixel.

◆ get_colormap() [1/2]

Glib::RefPtr<Colormap> Gdk::Image::get_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().

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
Colormap for the image.

◆ get_colormap() [2/2]

Glib::RefPtr<const Colormap> Gdk::Image::get_colormap ( ) const

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().

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
Colormap for the image.

◆ get_depth()

guint16 Gdk::Image::get_depth ( ) const

Determines the depth of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The depth.

◆ get_height()

int Gdk::Image::get_height ( ) const

Determines the height of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The height.

◆ get_image_type()

ImageType Gdk::Image::get_image_type ( ) const

Determines the type of a given image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The Gdk::ImageType of the image.

◆ get_mem() [1/2]

void* Gdk::Image::get_mem ( )

◆ get_mem() [2/2]

const void* Gdk::Image::get_mem ( ) const

◆ get_pixel()

guint32 Gdk::Image::get_pixel ( int  x,
int  y 
) const

◆ get_pixels() [1/2]

void* Gdk::Image::get_pixels ( )

Returns a pointer to the pixel data of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The pixel data of the image.

◆ get_pixels() [2/2]

const void* Gdk::Image::get_pixels ( ) const

Returns a pointer to the pixel data of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The pixel data of the image.

◆ get_type()

static GType Gdk::Image::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ get_visual() [1/2]

Glib::RefPtr<Visual> Gdk::Image::get_visual ( )

Determines the visual that was used to create the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
A Gdk::Visual.

◆ get_visual() [2/2]

Glib::RefPtr<const Visual> Gdk::Image::get_visual ( ) const

Determines the visual that was used to create the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
A Gdk::Visual.

◆ get_width()

int Gdk::Image::get_width ( ) const

Determines the width of the image.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Returns
The width.

◆ get_windowing_data()

void* Gdk::Image::get_windowing_data ( ) const

◆ gobj() [1/2]

GdkImage* Gdk::Image::gobj ( )
inline

Provides access to the underlying C GObject.

Definition at line 134 of file tk/ydkmm/ydkmm/gdkmm/image.h.

◆ gobj() [2/2]

const GdkImage* Gdk::Image::gobj ( ) const
inline

Provides access to the underlying C GObject.

Definition at line 137 of file tk/ydkmm/ydkmm/gdkmm/image.h.

◆ gobj_copy()

GdkImage* Gdk::Image::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ put_pixel()

void Gdk::Image::put_pixel ( int  x,
int  y,
guint32  pixel 
)

◆ set_colormap()

void Gdk::Image::set_colormap ( const Glib::RefPtr< Colormap > &  colormap)

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.

Deprecated: 2.22: Gdk::Image should not be used anymore.

Parameters
colormapA Gdk::Colormap.

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gdk::Image > wrap ( GdkImage object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file: