NAME
Tk::CanvasFig - additional Tk::Canvas methods for dealing with figs
SYNOPSIS
use Tk::CanvasFig;
$canvas->fig(-file => $filename, -imagedir => $filename."-images");
DESCRIPTION
This module adds another method to the Tk::Canvas namespace: fig
. The fig
method creates a xfig compatible file from the given canvas. The output is written to a file if the -file
option is specified, otherwise it is returned as a string. The creation of images is only supported if the -imagedir
option is specified.
ARGUMENTS
- -file
-
The file name for the FIG output. If this option is not specified, then the result will be returned as a string.
- -imagedir
-
If images are included in the canvas, then they will be written into the directory specified by this option. The directory has to exist. If this option is not specified, no images are created.
- -imagetype
-
The image type for the images created in
-imagedir
. By default,xpm
is used, but everyTk
-supported andxfig
-supported image type can be used. Note that a plainxfig
build does not havexpm
support. Also note that xfig uses external programs for decoding other file formats likegif
orppm
, so this can be *very* slow if you have a lot of images in the canvas. Ifnetpbm
withppmtopcx
is installed, the image typepcx
can be used, for whichxfig
does not need an external program. See also "BUGS".
BUGS
Not all canvas items are implemented (grid, groups).
Not everything is perfect.
xfig
3.2.3d dumps core if xpm
images with more than 256 colors are used. If you have such images, you have to use another -imagetype
.
Transparency will only be handled in xpm
images correctly. This is because netpbm
programs does not handle transparency.
SEE ALSO
AUTHOR
Slaven Rezic <slaven@rezic.de>
COPYRIGHT
Copyright (c) 1998, 2001, 2002, 2009 Slaven Rezic. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.