logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Games::Go::Sgf2Dg::Dg2TkPs - convert Games::Go::Sgf2Dg::Diagrams to Postscript from a Tk window

Bugs

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

perl v5.30.0                                       2019-10-27                    Games::Go::Sgf2Dg::Dg2TkPs(3pm)

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::Sgf2Dg::Dg2Ps for a better PostScript converter.

       A Games::Go::Sgf2Dg::Dg2TkPs inherits from Games::Go::Sgf2Dg::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.

       $dg2ps->comment ($comment ? , ... ?)
           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.

       $dg2ps->configure (option => value, ?...?)
           Grabs 'file' configuration option, passes all other requests to Dg2Tk.

       $dg2ps->close
           Converts  each  diagram Tk::Canvas in the Dg2Tk NoteBook to PostScript via the Tk::Canvas->postscript
           method.

Name

       Games::Go::Sgf2Dg::Dg2TkPs - convert Games::Go::Sgf2Dg::Diagrams to Postscript from a Tk window

See Also

sgf2dg(1)
           Script to convert SGF format files to Go diagrams

Synopsis

       use Games::Go::Sgf2Dg::Dg2TkPs

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

See Also