Hi all -
I'm noticing some odd behavior with MacPymol (v0.94) involving the
"viewport" command to resize the window. This command seems like it
couldn't be more straightforward: specify width and height in pixels.
However, look at the following output:
PyMOL>viewport 100,100
PyMOL>png test.png
ScenePNG: wrote 96x100 pixel image to file "test.png".
PyMOL>viewport 150,150
PyMOL>png test.png
ScenePNG: wrote 144x150 pixel image to file "test.png".
PyMOL>viewport 200,200
PyMOL>png test.png
ScenePNG: wrote 200x200 pixel image to file "test.png".
PyMOL>viewport 250,250
PyMOL>png test.png
ScenePNG: wrote 248x250 pixel image to file "test.png".
PyMOL>viewport 300,300
PyMOL>png test.png
ScenePNG: wrote 296x300 pixel image to file "test.png".
PyMOL>viewport 300,300
PyMOL>png test.png
ScenePNG: wrote 296x300 pixel image to file "test.png".
PyMOL>viewport 350,350
PyMOL>png test.png
ScenePNG: wrote 344x350 pixel image to file "test.png".
PyMOL>viewport 600,600
PyMOL>png test.png
ScenePNG: wrote 600x600 pixel image to file "test.png".
PyMOL>viewport 350,350
PyMOL>png test.png
ScenePNG: wrote 344x350 pixel image to file "test.png".
PyMOL>viewport 700,700
PyMOL>png test.png
ScenePNG: wrote 696x700 pixel image to file "test.png".
It seems that the viewport width is required to be a multiple of 8. Is
this true, and if so, why?
More seriously, look at the following:
PyMOL>viewport 800,800
PyMOL>png test.png
ScenePNG: wrote 800x700 pixel image to file "test.png".
PyMOL>viewport 800,800
PyMOL>png test.png
ScenePNG: wrote 800x800 pixel image to file "test.png".
An 800-pixel viewport is too big for my display (1024x768), but Pymol
resizes the window, to 800 x *700* pixels, without complaint. Repeating
the command resizes the window to 800x800, but now the upper 100 pixels
of the display window and menu area are no longer visible (they can be
restored by reducing viewport size.
You could say that the solution to this problem is "don't do that", but
shouldn't Pymol complain if you try to resize the window to an invalid size?
The 8-pixel issue doesn't exist on my SGI (Pymol v0.93), but the
oversize viewport one does (where the max viewport is 1104x964). Has
anyone else seen this?
Thanks,
Matt
--
Matthew Franklin Phone:(650)225-4596
Postdoctoral Researcher Fax:(650)225-3734
Genentech, Inc.
1 DNA Way, South San Francisco, CA 94080