Pixmap.createFromData

Warning gdk_pixmap_create_from_data has been deprecated since version 2.22 and should not be used in newly-written code. If you must replicate the functionality of this function, create a pixmap using gdk_pixmap_new(), cairo_paint() it with the background color and then create a Cairo image surface as pointed out in the docs to gdk_bitmap_create_from_data() and use this surface with cairo_mask_surface() to paint the foreground color. Create a two-color pixmap from data in XBM data.

class Pixmap
static
createFromData

Parameters

drawable Drawable

a GdkDrawable, used to determine default values for the new pixmap. Can be NULL, if the depth is given.

data string

a pointer to the data.

width int

the width of the new pixmap in pixels.

height int

the height of the new pixmap in pixels.

depth int

the depth (number of bits per pixel) of the new pixmap.

fg Color

the foreground color.

bg Color

the background color.

Return Value

Type: Pixmap

the GdkPixmap

Meta