This is a read-only mirror of pymolwiki.org
Difference between revisions of "Viewport"
Jump to navigation
Jump to search
m |
m (7 revisions) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | |||
'''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--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: | ||
+ | |||
+ | # 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=== |
Latest revision as of 03:36, 28 March 2014
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:
- 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
viewport width, height
PYMOL API
cmd.viewport(int width, int height)