/usr/share/doc/python-rabbyt/rabbyt/primitives/Quad/index.html is in python-rabbyt 0.8.1-2.
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 | <html>
<head>
<title>Quad - Rabbyt Reference</title>
</head>
<body>
<a href="../../../rabbyt/">Documentation Index</a> | From module <a href="../../../rabbyt/primitives/">rabbyt.primitives</a>.
<h1>Quad</h1>
<p><tt class="docutils literal"><span class="pre">Quad(definition)</span></tt></p>
<p><tt class="docutils literal"><span class="pre">Quad</span></tt> provides a convenient representation of a quadrilateral.
This is useful for specifying <tt class="docutils literal"><span class="pre">Sprite.shape</span></tt> and <tt class="docutils literal"><span class="pre">Sprite.tex_shape</span></tt>.</p>
<p><tt class="docutils literal"><span class="pre">definition</span></tt> can be in a number of forms:</p>
<blockquote>
<ul>
<li><dl class="first docutils">
<dt>A tuple with four vertexes.</dt>
<dd><p class="first last">For example: <tt class="docutils literal"><span class="pre">((0,1),</span> <span class="pre">(1,1),</span> <span class="pre">(1,0),</span> <span class="pre">(0,0))</span></tt>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>A tuple with the format <tt class="docutils literal"><span class="pre">(left,</span> <span class="pre">top,</span> <span class="pre">right,</span> <span class="pre">bottom)</span></tt>.</dt>
<dd><p class="first last">For example: <tt class="docutils literal"><span class="pre">(0,</span> <span class="pre">1,</span> <span class="pre">1,</span> <span class="pre">0)</span></tt>. You can also think of this as
<tt class="docutils literal"><span class="pre">(x1,</span> <span class="pre">y1,</span> <span class="pre">x2,</span> <span class="pre">y2)</span></tt>, giving the top-left and bottom-right corners
of a rectangle.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>A tuple in the format of pyglet's <tt class="docutils literal"><span class="pre">Texture.tex_coords</span></tt> attribute.</dt>
<dd><p class="first last">(This, is a flattened tuple giving each vertex in three
dimensions. The third dimension will be discarded.)</p>
</dd>
</dl>
</li>
</ul>
</blockquote>
<p><tt class="docutils literal"><span class="pre">Quad</span></tt> has a number of properties to make modifying it easier. The
<tt class="docutils literal"><span class="pre">width</span></tt> and <tt class="docutils literal"><span class="pre">height</span></tt> properties will scale the vertexes from the
center, but all other properties will move <em>all</em> vertexes the same amount.
(e.g., assigning to <tt class="docutils literal"><span class="pre">left</span></tt> will move the right side as well: the width
says the same.)</p>
<div class="section">
<h2>Properties</h2>
<div class="section">
<h3>bottom</h3>
<p>The y coordinate of the bottom-most point.</p>
</div>
<div class="section">
<h3>height</h3>
<p>The height between the top-most and bottom-most vertexes.</p>
<p>Assigning to this property will scale all vertexes from the center. So
the <tt class="docutils literal"><span class="pre">y</span></tt> property will remain the same, but <tt class="docutils literal"><span class="pre">top</span></tt> and <tt class="docutils literal"><span class="pre">bottom</span></tt>
properties will change.</p>
</div>
<div class="section">
<h3>left</h3>
<p>The x coordinate of the left-most point.</p>
</div>
<div class="section">
<h3>right</h3>
<p>The x coordinate of the right-most point.</p>
</div>
<div class="section">
<h3>top</h3>
<p>The y coordinate of the top-most point.</p>
</div>
<div class="section">
<h3>width</h3>
<p>The width between the left-most and right-most vertexes.</p>
<p>Assigning to this property will scale all vertexes from the center. So
the <tt class="docutils literal"><span class="pre">x</span></tt> property will remain the same, but <tt class="docutils literal"><span class="pre">left</span></tt> and <tt class="docutils literal"><span class="pre">right</span></tt>
properties will change.</p>
</div>
<div class="section">
<h3>x</h3>
<p>Halfway between <tt class="docutils literal"><span class="pre">left</span></tt> and <tt class="docutils literal"><span class="pre">right</span></tt>.</p>
</div>
<div class="section">
<h3>xy</h3>
<p>The coordinates of the center of the Quad.</p>
</div>
<div class="section">
<h3>y</h3>
<p>Halfway between <tt class="docutils literal"><span class="pre">top</span></tt> and <tt class="docutils literal"><span class="pre">bottom</span></tt>.</p>
</div>
</div>
</body>
</html>
|