Bitmap.createFromData

Warning gdk_bitmap_create_from_data has been deprecated since version 2.22 and should not be used in newly-written code. You can create a Cairo image surface using cairo_image_surface_create_for_data() instead. Specify CAIRO_FORMAT_A1 as the format to get a bitmap. Keep in mind that Cairo images must have a rowstride of 4 bytes, so you will need to align your data properly. If you must use a pixmap, use gdk_pixmap_new() with a depth of 1 to create a bitmap and then use gdk_cairo_create(), cairo_set_source_surface() and cairo_paint() to draw the image surface to the bitmap. Creates a new bitmap from data in XBM format.

class Bitmap
static
createFromData
(,
string data
,
int width
,
int height
)

Parameters

drawable Drawable

a GdkDrawable, used to determine default values for the new pixmap. Can be NULL, in which case the root window is used.

data string

a pointer to the XBM data.

width int

the width of the new pixmap in pixels.

height int

the height of the new pixmap in pixels.

Return Value

Type: Bitmap

the GdkBitmap

Meta