/usr/share/doc/python-elements/dynamic/manual.html is in python-elements 0.13+svn20090823.230+dfsg-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | <html>
<head>
<title>elements reference index</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link type="text/css" rel="stylesheet" href="index.css" />
</head>
<body>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="border: 3px solid black;">
<tr>
<td valign="center" width="230" bgcolor="#ffffff" align="center" style="padding: 6px;">
<img src="logo_small.png"><br>
elements documentation (r105)
</td>
<td valign="center" align="center" style="border-left: 3px solid black; padding: 6px;">
<a href="ref.html">Reference Index</a> || <a href="index.html">Help Contents</a> || <a href="manual.html">Manual</a><br>
<br>
<a href="elements.html">elements</a> || <a href="add.html">elements.add</a> || <a href="callbacks.html">elements.callbacks</a> || <a href="box2d/classb2_world.htm" target="_blank">elements.world</a> || <a href="box2d/hierarchy.htm" target="_blank">Box2D</a>
</td>
</tr>
</table>
<br>
<h3>Welcome to the Elements Manual</h2>
<ul>
This page will guide you along the first steps with Elements, you are heartly invited to
visit our IRC channel <b>#elements on irc.freenode.net</b>. No matter which timezone, there are
always friendly people around which are happy to
help out and discuss issues and ideas :-)<br>
<br>
Let's begin with an overview of the important
concepts.<br>
<br>
[[comment manual]]
<br><br>
<a name="drawing_methods"></a>
<h3>Drawing Methods</h3>
<ul>Elements can draw with different methods:
<ul>
<li><tt>cairo</tt></li>
<li><tt>pygame</tt></li>
<li><tt>opengl_pyglet</tt></li>
<li><small>(more coming soon :)</small></li>
</ul>
<br>
Be default, it is set to pygame, and can be changed on initializing Elements:<br><br>
<ul>
<tt>world = <a href="elements.html#elements.__init__">elements.Elements(screen_size=size, renderer="cairo")</a></tt>
</ul>
<br>
If the drawing method needs a surface, it can be passed to the renderer with:<br>
<br>
<ul><tt><a href="elements.html#elements.set_surface">elements.set_surface(screen)</a></tt></ul>
<br>
[[comment manual.drawing_methods]]<br>
</ul>
<a name="coordinate_systems"></a>
<h3>Internal Coordinate Systems</h3>
<ul>
<pre>
Elements Box2D OpenGL Cairo Pygame
+y +y +y +-------> +x +-------> +x
^ ^ ^ | |
| | | | |
| | | | |
| | | | |
+-------> +x +-------> +x +-------> +x V +y V +y
</pre>
<br>
[[comment manual.internal_coordinate_systems]]
</ul>
<br>
<a name="input_coordinates"></a>
<h3>Input of Coordinates</h3>
<ul>Elements will translate all input parameters to it's internal coordinate system (also called <b>world coordinate system</b>).<br>
<br>
The input coordinate system (<b>screen coordinate system</b>) is by default set to pygames,
which means that adding an object at (0,0)
will let it appear in the upper left corner. You can change the origin of your system with:<br>
<br>
<ul><tt><a href="elements.html#elements.set_inputAxisOrigin">elements.set_inputAxisOrigin(left, top)</a></tt></ul>
<br>For example if your game uses the same (screen) coordinate system as Elements, you need to set: <br>
<br><ul><tt>elements.set_inputAxisOrigin(left=True, top=False)</tt></ul>
<br>
[[comment manual.input_coordinates]]
</ul>
<br>
<a name="input_unit"></a>
<h3>Input Unit System (pixels or meters)</h3>
<ul>
Elements supports both, pixels and meters as input for lengths and positions. By default, the input units
are recognized as pixels, and will be translated into meters by the given ppm value (see
<a href="elements.html#elements.__init__">elements.__init__</a>).<br>
<br>
If you want to change the default input system (so you can supply the elements api
with parametersin meters rather than pixels), you can do so with<br>
<br><ul><tt><a href="elements.html#elements.set_inputUnit">elements.set_inputUnit(unit)</a></tt></ul>
<br>
Supported Unit Systems are:
<pre>INPUT_METERS
INPUT_PIXELS</pre>
<br>
[[comment manual.input_unit_system]]
</ul>
<br>
<a name="line_width"></a>
<h3>Line Width (Filled or border)</h3>
<ul>
You can set the border width of the objects to any pixel number,
or to 0 if you want to fill the shapes.
world.line_width = 4
<br>
<br>
[[comment manual.line_width]]
</ul>
<br>
<a name="callbacks"></a>
<h3>Callbacks</h3>
<ul>
With callbacks, user can start own functions on specified events with <a href="callbacks.html#elements.callbacks.add">elements.callbacks.add</a>. Currently supported callback types are:
<pre>CALLBACK_CONTACT_ADD
CALLBACK_CONTACT_PERSIST
CALLBACK_CONTACT_REMOVE</pre>
<br>
[[comment manual.callbacks]]
</ul>
<br>
<a name="densities"></a>
<h3>List of Densities of Various Materials</h3>
<ul>
<pre>Init: p = m / V ([p] = kg / m³)
Air 0.001225
Liquid ammonia 0.682
Oil 0.8
Water 1.0
Glycerine 1.26
Concrete 2.4
Aluminium 2.7
Iron 7.87
Copper 8.92
Lead 11.35
Mercury 13.6
Gold 19.3
Platinum 21.4
Osmium 22 </pre>
<br>
[[comment manual.densities]]
</ul>
</ul>
</body>
</html>
|