Difference between revisions of "Viewport"

From PyMOLWiki
Jump to: navigation, search
 
m (Stylistic correction of language.)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
===DESCRIPTION===
+
'''viewport''' changes the size of the viewing port--the visible openGL window (and thus the size of all png files subsequently output).
+
 
  "viewport" changes the size of the viewing port (and thus the size
+
No API command can reliably retrieve the viewport dimensions under all circumstances. However, it is possible to obtain the dimensions using a third party image viewer like Gimp or OS X Preview:
  of all png files subsequently output)
+
 
 +
# Save the current view as a png file ("png imagename.png").
 +
# Determine the image dimensions using a viewer program.
 +
 
 +
These dimensions can be applied directly using the viewport command or the API.
 
   
 
   
 
===USAGE===
 
===USAGE===
   
+
  viewport width, height
  viewport width, height
+
 
 
 
===PYMOL API===
 
===PYMOL API===
<source lang="python">
+
<source lang="python">
  cmd.viewport(int width, int height)  
+
cmd.viewport(int width, int height)
</source>
+
</source>
  
[[Category:Commands|viewport]]
+
[[Category:Commands|Viewport]]

Latest revision as of 13:08, 28 September 2011

viewport changes the size of the viewing port--the visible openGL window (and thus the size of all png files subsequently output).

No API command can reliably retrieve the viewport dimensions under all circumstances. However, it is possible to obtain the dimensions using a third party image viewer like Gimp or OS X Preview:

  1. Save the current view as a png file ("png imagename.png").
  2. Determine the image dimensions using a viewer program.

These dimensions can be applied directly using the viewport command or the API.

USAGE

viewport width, height

PYMOL API

cmd.viewport(int width, int height)