Where is the problem?

Cousin Stanley cousinstanley at gmail.com
Fri Feb 26 20:12:13 EST 2021


RD wrote:

> Python 3.4.3 on WinXP.
> 
> I create a Tk canvas and draw on it with create_text(),
> create_line(), and create_polygon with fill and stipple.
> 
> So far, so good, looks fine on the screen.
> 
> So I go to send it to a postsctript file:
> 
> bmap.postscript(file="tmp.ps", colormode='color')
> 
> It generates a file, no errors reported.
> 
> So I open up the file in a PS viewer (2, actually),
> and the saved file looks like someone left a
> watercolor out in the rain.
> 
> Artifacts everywhere, the lines are blurred, and the
> text is unreadable.
> 
> Googling was unhelpful; did I miss something?
> 
> TIA

  I have a couple of postscript saving examples
  that include the following geometry parameters
  which produce  .ps  files that render the same
  as the canvas drawings when viewed in ghostsript.
   
retval = canvas.postscript( 
           file       = "image/ps/xyzzy.ps , 
           height     = 400 , 
           width      = 400 ,
           pagewidth  = 400 , 
           pageheight = 400 ,  
           colormode = "color" )

  Perhaps adding the geomerty parameters
  might help.


-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona



More information about the Python-list mailing list