Bitmaps and Pixmaps

Name

Bitmaps and Pixmaps -- Offscreen drawables.

Synopsis


#include <gdk/gdk.h>


struct      GdkPixmap;
GdkPixmap*  gdk_pixmap_new                  (GdkWindow *window,
                                             gint width,
                                             gint height,
                                             gint depth);
GdkBitmap*  gdk_bitmap_create_from_data     (GdkWindow *window,
                                             const gchar *data,
                                             gint width,
                                             gint height);
GdkPixmap*  gdk_pixmap_create_from_data     (GdkWindow *window,
                                             const gchar *data,
                                             gint width,
                                             gint height,
                                             gint depth,
                                             GdkColor *fg,
                                             GdkColor *bg);
GdkPixmap*  gdk_pixmap_create_from_xpm      (GdkWindow *window,
                                             GdkBitmap **mask,
                                             GdkColor *transparent_color,
                                             const gchar *filename);
GdkPixmap*  gdk_pixmap_colormap_create_from_xpm
                                            (GdkWindow *window,
                                             GdkColormap *colormap,
                                             GdkBitmap **mask,
                                             GdkColor *transparent_color,
                                             const gchar *filename);
GdkPixmap*  gdk_pixmap_create_from_xpm_d    (GdkWindow *window,
                                             GdkBitmap **mask,
                                             GdkColor *transparent_color,
                                             gchar **data);
GdkPixmap*  gdk_pixmap_colormap_create_from_xpm_d
                                            (GdkWindow *window,
                                             GdkColormap *colormap,
                                             GdkBitmap **mask,
                                             GdkColor *transparent_color,
                                             gchar **data);
#define     gdk_pixmap_ref
#define     gdk_pixmap_unref
struct      GdkBitmap;
#define     gdk_bitmap_ref
#define     gdk_bitmap_unref


Description

Pixmaps are offscreen drawables. They can be drawn upon with the standard drawing primitives, then copied to another drawable (such as a GdkWindow) with gdk_pixmap_draw(). The depth of a pixmap is the number of bits per pixels. Bitmaps are simply pixmaps with a depth of 1. (That is, they are monochrome bitmaps - each pixel can be either on or off).

Details

struct GdkPixmap

struct GdkPixmap
{
  gpointer user_data;
};

An opaque structure representing an offscreen drawable. Pointers to structures of type GdkPixmap, GdkBitmap, and GdkWindow, can often be used interchangeably. The type GdkDrawable refers generically to any of these types.


gdk_pixmap_new ()

GdkPixmap*  gdk_pixmap_new                  (GdkWindow *window,
                                             gint width,
                                             gint height,
                                             gint depth);

Create a new pixmap with a given size and depth.


gdk_bitmap_create_from_data ()

GdkBitmap*  gdk_bitmap_create_from_data     (GdkWindow *window,
                                             const gchar *data,
                                             gint width,
                                             gint height);

Creates a new bitmap from data in XBM format.


gdk_pixmap_create_from_data ()

GdkPixmap*  gdk_pixmap_create_from_data     (GdkWindow *window,
                                             const gchar *data,
                                             gint width,
                                             gint height,
                                             gint depth,
                                             GdkColor *fg,
                                             GdkColor *bg);

Create a two-color pixmap from data in XBM data.


gdk_pixmap_create_from_xpm ()

GdkPixmap*  gdk_pixmap_create_from_xpm      (GdkWindow *window,
                                             GdkBitmap **mask,
                                             GdkColor *transparent_color,
                                             const gchar *filename);

Create a pixmap from a XPM file.


gdk_pixmap_colormap_create_from_xpm ()

GdkPixmap*  gdk_pixmap_colormap_create_from_xpm
                                            (GdkWindow *window,
                                             GdkColormap *colormap,
                                             GdkBitmap **mask,
                                             GdkColor *transparent_color,
                                             const gchar *filename);

Create a pixmap from a XPM file using a particular colormap.


gdk_pixmap_create_from_xpm_d ()

GdkPixmap*  gdk_pixmap_create_from_xpm_d    (GdkWindow *window,
                                             GdkBitmap **mask,
                                             GdkColor *transparent_color,
                                             gchar **data);

Create a pixmap from data in XPM format.


gdk_pixmap_colormap_create_from_xpm_d ()

GdkPixmap*  gdk_pixmap_colormap_create_from_xpm_d
                                            (GdkWindow *window,
                                             GdkColormap *colormap,
                                             GdkBitmap **mask,
                                             GdkColor *transparent_color,
                                             gchar **data);

Create a pixmap from data in XPM format using a particular colormap.


gdk_pixmap_ref

#define gdk_pixmap_ref                 gdk_drawable_ref

Warning

gdk_pixmap_ref is deprecated and should not be used in newly-written code.

Deprecated equivalent of g_object_ref().


gdk_pixmap_unref

#define gdk_pixmap_unref               gdk_drawable_unref

Warning

gdk_pixmap_unref is deprecated and should not be used in newly-written code.

Deprecated equivalent of g_object_unref().


struct GdkBitmap

struct GdkBitmap
{
  gpointer user_data;
};

An opaque structure representing an offscreen drawable of depth 1. Pointers to structures of type GdkPixmap, GdkBitmap, and GdkWindow, can often be used interchangeably. The type GdkDrawable refers generically to any of these types.


gdk_bitmap_ref

#define gdk_bitmap_ref                 gdk_drawable_ref

Warning

gdk_bitmap_ref is deprecated and should not be used in newly-written code.

Deprecated equivalent of g_object_ref().


gdk_bitmap_unref

#define gdk_bitmap_unref               gdk_drawable_unref

Warning

gdk_bitmap_unref is deprecated and should not be used in newly-written code.

Deprecated equivalent of g_object_unref().