SYNOPSIS

use Games::Go::Dg2TkPs

 my $dg2ps = B<Games::Go::Dg2TkPs-E<gt>new> (options);
 my $canvas = $dg2ps->convertDiagram($diagram);

DESCRIPTION

This is a real hack to get PostScript output from the Dg2Tk converter. All it does is use the built-in PostScript that a Tk::Canvas widget provides to convert the Dg2Tk canvas pages to PostScript. The resulting PostScript is fairly crude because the Canvas that it is drawn from is crude to begin with. See Games::Go::Dg2Ps for a better PostScript converter.

A Games::Go::Dg2TkPs inherits from Games::Go::Dg2Tk, and uses all its methods and options. The main difference is that after conversion to Tk is complete, each diagram Tk::Canvas is converted to PostScript via the Tk::Canvas->postscript method. Some minor massaging of the PostScript source is done to string the canvas pages together.

METHODS

See Dg2Tk for the usual Dg2* conversion methods. Inserts comments into the PostScript source code. Note that since the PostScript is generated after the diagrams are all constructed by Dg2Tk, comments are likely to be out of order - they will all be at the head of the PostScript file. Grabs 'file' configuration option, passes all other requests to Dg2Tk. Converts each diagram Tk::Canvas in the Dg2Tk NoteBook to PostScript via the Tk::Canvas->postscript method.

RELATED TO Games::Go::Dg2TkPs…

sgf2dg(1)

Script to convert \s-1SGF\s0 format files to Go diagrams

BUGS

The output is pretty ugly. Oh well, what can one expect from such a simple hack?

AUTHOR

Reid Augustin, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Reid Augustin

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.