![]() | ![]() | ![]() | GDK Reference Manual | ![]() |
---|
Bitmaps and Pixmaps — Offscreen drawables
#include <gdk/gdk.h> struct GdkPixmap; GdkPixmap* gdk_pixmap_new (GdkDrawable *drawable,gint width,gint height,gint depth); GdkBitmap* gdk_bitmap_create_from_data (GdkDrawable *drawable, constgchar *data,gint width,gint height); GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable, constgchar *data,gint width,gint height,gint depth, GdkColor *fg, GdkColor *bg); GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable, GdkBitmap **mask, GdkColor *transparent_color, constgchar *filename); GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, constgchar *filename); GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable, GdkBitmap **mask, GdkColor *transparent_color,gchar **data); GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable, 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
GObject +----GdkDrawable +----GdkPixmap
Pixmaps are offscreen drawables. They can be drawn upon with the
standard drawing primitives, then copied to another drawable (such as
a GdkWindow) with
struct GdkPixmap;
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.
GdkPixmap* gdk_pixmap_new (GdkDrawable *drawable,gint width,gint height,gint depth);
Create a new pixmap with a given size and depth.
drawable : | |
width : | The width of the new pixmap in pixels. |
height : | The height of the new pixmap in pixels. |
depth : | The depth (number of bits per pixel) of the new pixmap. If -1, and window is not NULL, the depth of the new pixmap will be equal to that of window. |
Returns : | the GdkPixmap |
GdkBitmap* gdk_bitmap_create_from_data (GdkDrawable *drawable, constgchar *data,gint width,gint height);
Creates a new bitmap from data in XBM format.
drawable : | |
data : | a pointer to the XBM data. |
width : | the width of the new pixmap in pixels. |
height : | the height of the new pixmap in pixels. |
Returns : | the GdkBitmap |
GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable, constgchar *data,gint width,gint height,gint depth, GdkColor *fg, GdkColor *bg);
Create a two-color pixmap from data in XBM data.
drawable : | |
data : | a pointer to the data. |
width : | the width of the new pixmap in pixels. |
height : | the height of the new pixmap in pixels. |
depth : | the depth (number of bits per pixel) of the new pixmap. |
fg : | the foreground color. |
bg : | the background color. |
Returns : | the GdkPixmap |
GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable, GdkBitmap **mask, GdkColor *transparent_color, constgchar *filename);
Create a pixmap from a XPM file.
drawable : | |
mask : | a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be NULL, in which case transparency will be ignored. |
transparent_color : | the color to be used for the pixels that are transparent in the input file. Can be NULL, in which case a default color will be used. |
filename : | the filename of a file containing XPM data. |
Returns : | the GdkPixmap |
GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color, constgchar *filename);
Create a pixmap from a XPM file using a particular colormap.
drawable : | |
colormap : | the GdkColormap that the new pixmap will be use. If omitted, the colormap for window will be used. |
mask : | a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be NULL, in which case transparency will be ignored. |
transparent_color : | the color to be used for the pixels that are transparent in the input file. Can be NULL, in which case a default color will be used. |
filename : | the filename of a file containing XPM data. |
Returns : | the GdkPixmap. |
GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable, GdkBitmap **mask, GdkColor *transparent_color,gchar **data);
Create a pixmap from data in XPM format.
drawable : | |
mask : | Pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be NULL, in which case transparency will be ignored. |
transparent_color : | This color will be used for the pixels that are transparent in the input file. Can be NULL in which case a default color will be used. |
data : | Pointer to a string containing the XPM data. |
Returns : | the GdkPixmap |
GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable, GdkColormap *colormap, GdkBitmap **mask, GdkColor *transparent_color,gchar **data);
Create a pixmap from data in XPM format using a particular colormap.
drawable : | |
colormap : | the GdkColormap that the new pixmap will be use. If omitted, the colormap for window will be used. |
mask : | a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be NULL, in which case transparency will be ignored. |
transparent_color : | the color to be used for the pixels that are transparent in the input file. Can be NULL, in which case a default color will be used. |
data : | Pointer to a string containing the XPM data. |
Returns : | the GdkPixmap. |
#define gdk_pixmap_ref gdk_drawable_ref
gdk_pixmap_ref is deprecated and should not be used in newly-written code.
Deprecated equivalent of
Returns : | pixmap |
#define gdk_pixmap_unref gdk_drawable_unref
gdk_pixmap_unref is deprecated and should not be used in newly-written code.
Deprecated equivalent of
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.
#define gdk_bitmap_ref gdk_drawable_ref
gdk_bitmap_ref is deprecated and should not be used in newly-written code.
Deprecated equivalent of
Returns : | pixmap |
<< Drawing Primitives | GdkRGB >> |