You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/VPythonDocs/canvas.html
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -88,16 +88,12 @@ <h1 class="Heading-1"> <font color="#0000A0">Controlling One or More VPython
88
88
<pclass="attributes"><spanclass="attribute">capture(filename) </span>Sends to your Download folder a png screen shot of the canvas. If filename is the string "boxes" or "boxes.png" the file will be named "boxes.png". If you execute scene.capture("boxes") repeatedly, the additional files will be named "boxes(1).png", "boxes(2).png", etc. If you do not want to capture "label" objects, execute scene.capture(filename, False)</p>
89
89
<pclass="attributes"><spanclass="attribute"><fontcolor="#000000">To obtain the current location of the camera, <ahref="#camera"><strong>see </strong></a></font></span><strong><ahref="#camera">below</a></strong> for details of <spanclass="attribute">scene.camera.pos</span><fontcolor="#000000">.</font></p>
90
90
<pclass="attributes"><spanclass="attribute">camera.follow</span> If you say <spanclass="attribute">scene.camera.follow(ball)</span>, the center of the scene will continually be reset to the current position of the ball object. To stop following the object, execute <spanclass="attribute">scene.camera.follow(None)</span>.</p>
91
-
<pclass="attributes"> Instead of specifying an object to follow, you can provide a function of your own:</p>
91
+
<pclass="attributes"> Instead of specifying an object to follow, you can provide a function of your own (not yet available in VPython 7):</p>
<pclass="attributes"> Alternatively, in Web VPython you can specify an "anonymous" (unnamed) function, though this does not work in true Python:</p>
<pclass="attributes"><spanclass="attribute">pixel_to_world</span> Gives the width of a pixel in "world" coordinates (that is, the coordinates you use to position objects). This is read-only; you cannot set it. It is determined from the current value of scene.range. An example of its use is that if you want the radius of a curve object to be 5 pixels, set the radius to 5*scene.pixel_to_world.</p>
96
+
<pclass="attributes"><spanclass="attribute">pixel_to_world</span> Gives the width of a pixel in "world" coordinates (that is, the coordinates you use to position objects). This is read-only; you cannot set it. It is determined from the current value of scene.range. An example of its use is that if you want the radius of a curve object to be 5 pixels, set the radius to 5*scene.pixel_to_world.</p>
101
97
<pclass="Normal">Here are canvas options to wait for canvas updates:</p>
102
98
<pclass="attributes"><spanclass="attribute">scene.waitfor("redraw") </span>Wait for the start of the next update of the canvas by the web browser</p>
103
99
<pclass="attributes"><spanclass="attribute">scene.waitfor("draw_complete") </span>Wait for the end of the next update of the canvas by the web browser</p>
0 commit comments