
78 Perl/Tk Pocket Reference
$image->write(pathName ?, -option => value ... ?);
Writes image data from image into file pathName.
-format => format-name
Specifies image format for the file.
-from => x1, y1, x2, y2
Specifies a rectangular region of the image to copy
from.
13. Window Information
$widget->atom(name);
Returns integer identifier for atom given by name on
$widget’s display.
$widget->atomname(id);
Returns textual name of atom given by integer id on
$widget’s display.
$widget->cells;
Returns number of cells in the colormap for
$widget.
$widget->children;
Returns a list containing widget references of all the chil-
dren of
$widget.
$widget->class;
Returns the class name of
$widget.
$widget->colormapfull;
Returns 1 if the colormap for
$widget is full, 0 otherwise.
$widget->containing(rootX, rootY);
Returns the widget reference of window containing the
point rootX rootY on
$widget’s display.
$widget->depth;
Returns the depth (bits per pixel) of
$widget.
Exists(
$widget);
Returns 1 if there exists a window for $widget, ‘ ’ (false) if
no such window exists.