---
name: "Gtk2::Gdk::Pixmap"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::Gdk::Pixmap"
---

# Gtk2::Gdk::Pixmap(3pm)

wrapper for GdkPixmap

## NAME

Gtk2::Gdk::Pixmap - wrapper for GdkPixmap

## HIERARCHY

```
  Glib::Object
  +----Gtk2::Gdk::Drawable
       +----Gtk2::Gdk::Pixmap
```

## METHODS

### pixmap = Gtk2::Gdk::Pixmap-\>new ($drawable, $width, $height, $depth)

- •

  `$drawable` (Gtk2::Gdk::Drawable or undef)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$depth` (integer)

### (pixmap, mask) = Gtk2::Gdk::Pixmap-\>colormap\_create\_from\_xpm ($drawable, $colormap, $transparent\_color, $filename)

- •

  `$drawable` (Gtk2::Gdk::Drawable or undef) may be undef if *$colormap* is given

- •

  `$colormap` (Gtk2::Gdk::Colormap or undef) GdkColormap to use for the new image; may be undef if *$drawable* is given.

- •

  `$transparent_color` (Gtk2::Gdk::Color or undef) color of pixels that are transparent in the input file.  if undef, a default is used.

- •

  `$filename` (localized file name)

### ($pixmap, $mask) = Gtk2::Gdk::Pixmap-\>colormap\_create\_from\_xpm\_d ($drawable, $colormap, $transparent\_color, @xpm\_data)

- •

  `$drawable` (Gtk2::Gdk::Drawable or undef) may be undef if *$colormap* is given

- •

  `$colormap` (Gtk2::Gdk::Colormap or undef) GdkColormap to use for the new image; may be undef if *$drawable* is given.

- •

  `$transparent_color` (Gtk2::Gdk::Color or undef) color of pixels that are transparent in the input file.  if undef, a default is used.

- •

  ... (list) of strings, xpm data

Create a pixmap from the provided xpm data, using a specific colormap. See `"create_from_xpm_d"`.

### pixmap = Gtk2::Gdk::Pixmap-\>create\_from\_data ($drawable, $data, $width, $height, $depth, $fg, $bg)

- •

  `$drawable` (Gtk2::Gdk::Drawable)

- •

  `$data` (string)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$depth` (integer)

- •

  `$fg` (Gtk2::Gdk::Color)

- •

  `$bg` (Gtk2::Gdk::Color)

### (pixmap, mask) = Gtk2::Gdk::Pixmap-\>create\_from\_xpm ($drawable, $transparent\_color, $filename)

- •

  `$drawable` (Gtk2::Gdk::Drawable)

- •

  `$transparent_color` (Gtk2::Gdk::Color or undef)

- •

  `$filename` (localized file name)

### ($pixmap, $mask) = Gtk2::Gdk::Pixmap-\>create\_from\_xpm\_d ($drawable, $transparent\_color, @xpm\_data)

- •

  `$drawable` (Gtk2::Gdk::Drawable) used to determine the colormap and visual of the image.

- •

  `$transparent_color` (Gtk2::Gdk::Color or undef) color of pixels that are transparent in the input file.  if undef, a default is used.

- •

  ... (list) of strings, xpm data

Create a pixmap from the provided xpm data, usually included in the program as an inline image.  See `"new_from_xpm_data"` in Gtk2::Gdk::Pixbuf for a  description of the format of this data.

### pixmap = Gtk2::Gdk::Pixmap-\>foreign\_new ($anid)

- •

  `$anid` (Gtk2::Gdk::NativeWindow)

### pixmap = Gtk2::Gdk::Pixmap-\>foreign\_new\_for\_display ($display, $anid)

- •

  `$display` (Gtk2::Gdk::Display)

- •

  `$anid` (Gtk2::Gdk::NativeWindow)

Since: gtk+ 2.2

### pixmap = Gtk2::Gdk::Pixmap-\>foreign\_new\_for\_screen ($screen, $anid, $width, $height, $depth)

- •

  `$screen` (Gtk2::Gdk::Screen)

- •

  `$anid` (Gtk2::Gdk::NativeWindow)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$depth` (integer)

Since: gtk+ 2.10

### pixmap = Gtk2::Gdk::Pixmap-\>lookup ($anid)

- •

  `$anid` (Gtk2::Gdk::NativeWindow)

### pixmap = Gtk2::Gdk::Pixmap-\>lookup\_for\_display ($display, $anid)

- •

  `$display` (Gtk2::Gdk::Display)

- •

  `$anid` (Gtk2::Gdk::NativeWindow)

Since: gtk+ 2.2

## SEE ALSO

Gtk2, Glib::Object, Gtk2::Gdk::Drawable

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
