Tk::Pixmap(3pm)

Tk::Pixmap3pm

Create color images from xpm files.

Usage

$widget->Pixmap?(name?,options?)?

Overview

XPM is a popular X Window image file format for storing color icons. The Pixmap image type can be used to create color images using XPM files.

Pixmaps support the following options:

-data => string

Specifies the contents of the source pixmap as a string. The string must adhere to the XPM file format (e.g., as generated by the pixmap(1) program). If both the -data and -file options are specified, the -data option takes precedence. Please note that the XPM file parsing code in the xpm library is somewhat fragile. The first line of the string must be "/* XPM */" or otherwise a segmatation fault will be caused.

-file => name

name gives the name of a file whose contents define the source pixmap. The file must adhere to the XPM file format (e.g., as generated by the pixmap(1) program).

Image methods

When a pixmap image is created, Tk also creates a new object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above.

Keywords

pixmap, image, tix

Releases

15 releases since Debian 2.1 (Slink); the text changed 14 times.

  1. 2.1
  2. 2.2
  3. 3.0
  4. 3.1
  5. 4.0
  6. 5.0
  7. 6.0
  8. 7
  9. 8
  10. 9
  11. 10
  12. 11
  13. 12
  14. 13
  15. Arch

From perl-tk 804.036-9 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.