[Contents] [Back] [Prev] [Up] [Next] [Forward]

# Package Gdk.Bitmap

Pixmaps are off-screen drawables. They can be drawn upon with the standard drawing primitives, then copied to another drawable (such as a Gdk_Window) 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). see section Package Gdk.Pixmap for more details on pixmap handling.

- Gdk.Bitmap Types
- Gdk.Bitmap Subprograms

## Types

    subtype Gdk_Bitmap is Gdk.Gdk_Bitmap;

| A black and white image. This type is mainly used as a mask when drawing other colored images. Each pixel can have two values, 0 or 1.

## Subprograms

    procedure Gdk_New
      (Bitmap             : out    Gdk_Bitmap;
       Window             : in     Gdk.Window.Gdk_Window;
       Width              : in     Gint;
       Height             : in     Gint);

| Create a new bitmap with a given size. Window is used to determine default values for the new bitmap. Can be eventually null in which case the root window is used. Width is the width of the new bitmap in pixels. Height is the height of the new bitmap in pixels.

    procedure Ref
      (Bitmap             : in     Gdk_Bitmap);

| Add a reference to a bitmap.

    procedure Unref
      (Bitmap             : in     Gdk_Bitmap);

| This is the usual way to destroy a bitmap. The memory is freed when there is no more reference

    procedure Create_From_Data
      (Bitmap             : out    Gdk_Bitmap;
       Window             : in     Gdk.Window.Gdk_Window;
       Data               : in     String;
       Width              : in     Gint;
       Height             : in     Gint);

| Create a bitmap from data in XBM format. Window is used to determine default values for the new bitmap, can be null in which case the root window is used. Data is the XBM data. Width is the width of the new bitmap in pixels. Height is the height of the new bitmap in pixels.

[Contents] [Back] [Prev] [Up] [Next] [Forward]