File: Pan.html

package info (click to toggle)
renpy 6.10.2.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,468 kB
  • ctags: 5,383
  • sloc: python: 17,801; ansic: 7,116; makefile: 127; sh: 15
file content (34 lines) | stat: -rw-r--r-- 3,358 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html><head><title>Pan - Ren'Py Visual Novel Engine</title><link href="../../shared.css" rel="stylesheet"><link href="../../monobook.css" rel="stylesheet"><link href="../../common.css" rel="stylesheet"><link href="../../monobook2.css" rel="stylesheet"><link href="../../docs.css" rel="stylesheet" /></link></link></link></link></head><body><div id="bodyContent">
			<p class="docnav"><a href="../../index.html">documentation index</a> &#9702; <a href="../Reference_Manual.html">reference manual</a> &#9702; <a href="../Function_Index.html">function index</a></p><p><a id="Pan" name="Pan"></a></p>
<h1><span class="mw-headline">Pan</span></h1>
<p><span id="Pan" /></p>
<table>
<tr>
<td valign="top">Function:</td>
<td valign="top"><b><strong class="selflink">Pan</strong></b></td>
<td valign="top">(startpos, endpos, time, repeat=False, bounce=False, time_warp=None, **properties):</td>
</tr>
</table>
<div class="renpy-doc">
<p>Pan, when given the appropriate arguments, gives an object that can be passed to the at clause of an image to cause the image to be panned on the screen. The parameters <i>startpos</i> and <i>endpos</i> are tuples, containing the x and y coordinates of the upper-left hand corner of the screen relative to the image. <i>time</i> is the time it will take this position to move from startpos to endpos. <i>repeat</i>, <i>bounce</i>, and <i>time_warp</i> are as for <a href="../../reference/functions/Motion.html" title="renpy/doc/reference/functions/Motion">Motion</a>.</p>
<p>As the current implementation of Ren'Py is quite limited, there are quite a few restrictions that we put on pan. The big one is that there always must be a screen's worth of pixels to the right and below the start and end positions. Failure to ensure this may lead to inconsistent rendering.</p>
<p>Please note that the pan will be immediately displayed, and that Ren'Py will not wait for it to complete before moving on to the next statement. This may lead to the pan being overlayed with text or dialogue. You may want to use a call to <a href="../../reference/functions/renpy.pause.html" title="renpy/doc/reference/functions/renpy.pause">renpy.pause</a> to delay for the time it will take to complete the pan.</p>
<p>Finally, also note that when a pan is completed, the image locks into the ending position.</p>
</div>
<p><a id="Example" name="Example"></a></p>
<h2><span class="mw-headline">Example</span></h2>
<pre>
<span class="str">"For this example, assume that the screen is 800 x 600, and that the image</span>
<span class="str"> marspan is 2400 x 600 pixels in size. We want to take 10 seconds to pan</span>
<span class="str"> from left to right on the image."</span>

<span class="kwa">scene</span> marspan <span class="kwa">at</span> <span class="kwd">Pan</span><span class="sym">((</span><span class="num">0</span><span class="sym">,</span> <span class="num">0</span><span class="sym">), (</span><span class="num">1600</span><span class="sym">,</span> <span class="num">0</span><span class="sym">),</span> <span class="num">10.0</span><span class="sym">)</span>
</pre>
<p><br /></p>




<div class="visualClear" />
		<hr /><p class="docnav"><a href="../../index.html">documentation index</a> &#9702; <a href="../Reference_Manual.html">reference manual</a> &#9702; <a href="../Function_Index.html">function index</a></p></div>
	</body></html>