home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!opl.com!hri.com!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!milo.mcs.anl.gov!donner.mcs.anl.gov!lusk
- From: lusk@donner.mcs.anl.gov (Rusty Lusk)
- Newsgroups: comp.lang.tcl
- Subject: Re: printing a canvas
- Message-ID: <1993Jan27.211024.15671@mcs.anl.gov>
- Date: 27 Jan 93 21:10:24 GMT
- References: <1k6igdINNqnj@cae.cad.gatech.edu>
- Sender: usenet@mcs.anl.gov
- Reply-To: lusk@donner.mcs.anl.gov (Rusty Lusk)
- Organization: Argonne National Laboratory, Chicago, Illinois
- Lines: 20
-
- In article <1k6igdINNqnj@cae.cad.gatech.edu>, estephen@whosnext.cad.gatech.edu (Eric R Stephens) writes:
-
- > How do you print canvases?
-
- I just discovered this, and it works great. For some reason it is not
- described in the man page for canvases. You can figure out the possible
- options by looking in the source code, however. Here is an example:
-
- button .buttonframe.print -text Print -borderwidth 2 -command print
-
- proc print {} {
- .canvas postscript -file $filename -x 0 -y 0 -width 500 -height 500
- }
-
- When you hit the button you get a file with nice color postscript
- for the canvas. Goddbye forever to screendumps. The only problem is that
- it seems to ignore the backgound color of the canvas (always comes out white),
- but you can draw a big rectangle on the canvas to take care of this.
-
- - Rusty Lusk
-