/usr/share/doc/python-djvu-doc/html/geometry.html is in python-djvu-doc 0.3.9-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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Geometry and colors — python-djvulibre 0.3.9 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.3.9',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="python-djvulibre 0.3.9 documentation" href="index.html" />
<link rel="next" title="Document files" href="files.html" />
<link rel="prev" title="Document pages" href="pages.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="files.html" title="Document files"
accesskey="N">next</a></li>
<li class="right" >
<a href="pages.html" title="Document pages"
accesskey="P">previous</a> |</li>
<li><a href="index.html">python-djvulibre 0.3.9 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="geometry-and-colors">
<h1>Geometry and colors<a class="headerlink" href="#geometry-and-colors" title="Permalink to this headline">¶</a></h1>
<div class="section" id="geometry">
<h2>Geometry<a class="headerlink" href="#geometry" title="Permalink to this headline">¶</a></h2>
<div class="section" id="transformations">
<h3>Transformations<a class="headerlink" href="#transformations" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="djvu.decode.AffineTransform">
<em class="property">class </em><tt class="descclassname">djvu.decode.</tt><tt class="descname">AffineTransform</tt><big>(</big><em>(x0</em>, <em>y0</em>, <em>w0</em>, <em>h0)</em>, <em>(x1</em>, <em>y1</em>, <em>w1</em>, <em>h1)</em><big>)</big><a class="headerlink" href="#djvu.decode.AffineTransform" title="Permalink to this definition">¶</a></dt>
<dd><p>The object represents an affine coordinate transformation that maps points
from rectangle (<cite>x0</cite>, <cite>y0</cite>, <cite>w0</cite>, <cite>h0</cite>) to rectangle (<cite>x1</cite>, <cite>y1</cite>, <cite>w1</cite>, <cite>h1</cite>).</p>
<dl class="method">
<dt id="djvu.decode.AffineTransform.rotate">
<tt class="descname">rotate</tt><big>(</big><em>n</em><big>)</big><a class="headerlink" href="#djvu.decode.AffineTransform.rotate" title="Permalink to this definition">¶</a></dt>
<dd><p>Rotate the output rectangle counter-clockwise by <cite>n</cite> degrees.</p>
</dd></dl>
<dl class="method">
<dt id="djvu.decode.AffineTransform.apply">
<tt class="descname">apply</tt><big>(</big><em>(x</em>, <em>y)</em><big>)</big><a class="headerlink" href="#djvu.decode.AffineTransform.apply" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">apply</tt><big>(</big><em>(x</em>, <em>y</em>, <em>w</em>, <em>h)</em><big>)</big></dt>
<dd><p>Apply the coordinate transform to a point or a rectangle.</p>
</dd></dl>
<dl class="method">
<dt id="djvu.decode.AffineTransform.inverse">
<tt class="descname">inverse</tt><big>(</big><em>(x</em>, <em>y)</em><big>)</big><a class="headerlink" href="#djvu.decode.AffineTransform.inverse" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">inverse</tt><big>(</big><em>(x</em>, <em>y</em>, <em>w</em>, <em>h)</em><big>)</big></dt>
<dd><p>Apply the inverse coordinate transform to a point or a rectangle.</p>
</dd></dl>
<dl class="method">
<dt id="djvu.decode.AffineTransform.mirror_x">
<tt class="descname">mirror_x</tt><big>(</big><big>)</big><a class="headerlink" href="#djvu.decode.AffineTransform.mirror_x" title="Permalink to this definition">¶</a></dt>
<dd><p>Reverse the X coordinates of the output rectangle.</p>
</dd></dl>
<dl class="method">
<dt id="djvu.decode.AffineTransform.mirror_y">
<tt class="descname">mirror_y</tt><big>(</big><big>)</big><a class="headerlink" href="#djvu.decode.AffineTransform.mirror_y" title="Permalink to this definition">¶</a></dt>
<dd><p>Reverse the Y coordinates of the output rectangle.</p>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="section" id="pixel-formats">
<h2>Pixel formats<a class="headerlink" href="#pixel-formats" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="djvu.decode.PixelFormat">
<em class="property">class </em><tt class="descclassname">djvu.decode.</tt><tt class="descname">PixelFormat</tt><a class="headerlink" href="#djvu.decode.PixelFormat" title="Permalink to this definition">¶</a></dt>
<dd><p>Abstract base for all pixel formats.</p>
<p>Inheritance diagram:</p>
<blockquote>
<div><p class="graphviz">
<img src="_images/inheritance-eaba046636478a06933121ea53fe0ee414f7908a.png" alt="Inheritance diagram of PixelFormatRgb, PixelFormatRgbMask, PixelFormatGrey, PixelFormatPalette, PixelFormatPackedBits" usemap="#inheritance82e67ac580" class="inheritance"/>
<map id="inheritance82e67ac580" name="inheritance82e67ac580">
<area shape="rect" id="node1" href="#djvu.decode.PixelFormatRgb" title="PixelFormatRgb" alt="" coords="176,5,296,33"/>
<area shape="rect" id="node2" href="#djvu.decode.PixelFormat" title="PixelFormat" alt="" coords="7,106,103,134"/>
<area shape="rect" id="node4" href="#djvu.decode.PixelFormatPalette" title="PixelFormatPalette" alt="" coords="165,55,307,83"/>
<area shape="rect" id="node6" href="#djvu.decode.PixelFormatRgbMask" title="PixelFormatRgbMask" alt="" coords="159,106,313,134"/>
<area shape="rect" id="node8" href="#djvu.decode.PixelFormatPackedBits" title="PixelFormatPackedBits" alt="" coords="153,157,319,185"/>
<area shape="rect" id="node10" href="#djvu.decode.PixelFormatGrey" title="PixelFormatGrey" alt="" coords="173,207,299,235"/>
</map>
</p>
</div></blockquote>
<dl class="attribute">
<dt id="djvu.decode.PixelFormat.rows_top_to_bottom">
<tt class="descname">rows_top_to_bottom</tt><a class="headerlink" href="#djvu.decode.PixelFormat.rows_top_to_bottom" title="Permalink to this definition">¶</a></dt>
<dd><p>Flag indicating whether the rows in the pixel buffer are stored
starting from the top or the bottom of the image.</p>
<p>Default ordering starts from the bottom of the image. This is the
opposite of the X11 convention.</p>
</dd></dl>
<dl class="attribute">
<dt id="djvu.decode.PixelFormat.y_top_to_bottom">
<tt class="descname">y_top_to_bottom</tt><a class="headerlink" href="#djvu.decode.PixelFormat.y_top_to_bottom" title="Permalink to this definition">¶</a></dt>
<dd><p>Flag indicating whether the <em>y</em> coordinates in the drawing area are
oriented from bottom to top, or from top to bottom.</p>
<p>The default is bottom to top, similar to PostScript. This is the
opposite of the X11 convention.</p>
</dd></dl>
<dl class="attribute">
<dt id="djvu.decode.PixelFormat.bpp">
<tt class="descname">bpp</tt><a class="headerlink" href="#djvu.decode.PixelFormat.bpp" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the depth of the image, in bits per pixel.</p>
</dd></dl>
<dl class="attribute">
<dt id="djvu.decode.PixelFormat.dither_bpp">
<tt class="descname">dither_bpp</tt><a class="headerlink" href="#djvu.decode.PixelFormat.dither_bpp" title="Permalink to this definition">¶</a></dt>
<dd><p>The final depth of the image on the screen. This is used to decide
which dithering algorithm should be used.</p>
<p>The default is usually appropriate.</p>
</dd></dl>
<dl class="attribute">
<dt id="djvu.decode.PixelFormat.gamma">
<tt class="descname">gamma</tt><a class="headerlink" href="#djvu.decode.PixelFormat.gamma" title="Permalink to this definition">¶</a></dt>
<dd><p>Gamma of the display for which the pixels are intended. This will be
combined with the gamma stored in DjVu documents in order to compute
a suitable color correction.</p>
<p>The default value is 2.2.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="djvu.decode.PixelFormatRgb">
<em class="property">class </em><tt class="descclassname">djvu.decode.</tt><tt class="descname">PixelFormatRgb</tt><big>(</big><span class="optional">[</span><em>byteorder='RGB'</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#djvu.decode.PixelFormatRgb" title="Permalink to this definition">¶</a></dt>
<dd><p>24-bit pixel format, with:</p>
<ul class="simple">
<li>RGB (<cite>byteorder</cite> = <tt class="docutils literal"><span class="pre">'RGB'</span></tt>) or</li>
<li>BGR (<cite>byteorder</cite> = <tt class="docutils literal"><span class="pre">'BGR'</span></tt>)</li>
</ul>
<p>byte order.</p>
</dd></dl>
<dl class="class">
<dt id="djvu.decode.PixelFormatRgbMask">
<em class="property">class </em><tt class="descclassname">djvu.decode.</tt><tt class="descname">PixelFormatRgbMask</tt><big>(</big><em>red_mask</em>, <em>green_mask</em>, <em>blue_mask</em><span class="optional">[</span>, <em>xor_value</em><span class="optional">]</span>, <em>bpp=16</em><big>)</big><a class="headerlink" href="#djvu.decode.PixelFormatRgbMask" title="Permalink to this definition">¶</a></dt>
<dt>
<em class="property">class </em><tt class="descclassname">djvu.decode.</tt><tt class="descname">PixelFormatRgbMask</tt><big>(</big><em>red_mask</em>, <em>green_mask</em>, <em>blue_mask</em><span class="optional">[</span>, <em>xor_value</em><span class="optional">]</span>, <em>bpp=32</em><big>)</big></dt>
<dd><p><cite>red_mask</cite>, <cite>green_mask</cite> and <cite>blue_mask</cite> are bit masks for color components
for each pixel. The resulting color is then xored with the <cite>xor_value</cite>.</p>
<p>For example, <tt class="docutils literal"><span class="pre">PixelFormatRgbMask(0xf800,</span> <span class="pre">0x07e0,</span> <span class="pre">0x001f,</span> <span class="pre">bpp=16)</span></tt> is a
highcolor format with:</p>
<ul class="simple">
<li>5 (most significant) bits for red,</li>
<li>6 bits for green,</li>
<li>5 (least significant) bits for blue.</li>
</ul>
</dd></dl>
<dl class="class">
<dt id="djvu.decode.PixelFormatGrey">
<em class="property">class </em><tt class="descclassname">djvu.decode.</tt><tt class="descname">PixelFormatGrey</tt><a class="headerlink" href="#djvu.decode.PixelFormatGrey" title="Permalink to this definition">¶</a></dt>
<dd><p>8-bit, grey pixel format.</p>
</dd></dl>
<dl class="class">
<dt id="djvu.decode.PixelFormatPalette">
<em class="property">class </em><tt class="descclassname">djvu.decode.</tt><tt class="descname">PixelFormatPalette</tt><big>(</big><em>palette</em><big>)</big><a class="headerlink" href="#djvu.decode.PixelFormatPalette" title="Permalink to this definition">¶</a></dt>
<dd><p>Palette pixel format.</p>
<p><cite>palette</cite> must be a dictionary which contains 216 (6 x 6 x 6)
entries of a web color cube, such that:</p>
<ul class="simple">
<li>for each key <tt class="docutils literal"><span class="pre">(r,</span> <span class="pre">g,</span> <span class="pre">b)</span></tt>: <tt class="docutils literal"><span class="pre">r</span> <span class="pre">in</span> <span class="pre">range(0,</span> <span class="pre">6)</span></tt>, <tt class="docutils literal"><span class="pre">g</span> <span class="pre">in</span> <span class="pre">range(0,</span> <span class="pre">6)</span></tt> etc.;</li>
<li>for each value <tt class="docutils literal"><span class="pre">v</span></tt>: <tt class="docutils literal"><span class="pre">v</span> <span class="pre">in</span> <span class="pre">range(0,</span> <span class="pre">0x100)</span></tt>.</li>
</ul>
</dd></dl>
<dl class="class">
<dt id="djvu.decode.PixelFormatPackedBits">
<em class="property">class </em><tt class="descclassname">djvu.decode.</tt><tt class="descname">PixelFormatPackedBits</tt><big>(</big><em>endianness</em><big>)</big><a class="headerlink" href="#djvu.decode.PixelFormatPackedBits" title="Permalink to this definition">¶</a></dt>
<dd><p>Bitonal, 1 bit per pixel format with:</p>
<ul class="simple">
<li>most significant bits on the left (<em>endianness</em> = <tt class="docutils literal"><span class="pre">'>'</span></tt>) or</li>
<li>least significant bits on the left (<em>endianness</em> = <tt class="docutils literal"><span class="pre">'<'</span></tt>).</li>
</ul>
</dd></dl>
</div>
<div class="section" id="render-modes">
<h2>Render modes<a class="headerlink" href="#render-modes" title="Permalink to this headline">¶</a></h2>
<dl class="data">
<dt id="djvu.decode.djvu.decode.RENDER_COLOR">
<tt class="descclassname">djvu.decode.</tt><tt class="descname">RENDER_COLOR</tt><a class="headerlink" href="#djvu.decode.djvu.decode.RENDER_COLOR" title="Permalink to this definition">¶</a></dt>
<dd><p>Render color page or stencil.</p>
</dd></dl>
<dl class="data">
<dt id="djvu.decode.djvu.decode.RENDER_BLACK">
<tt class="descclassname">djvu.decode.</tt><tt class="descname">RENDER_BLACK</tt><a class="headerlink" href="#djvu.decode.djvu.decode.RENDER_BLACK" title="Permalink to this definition">¶</a></dt>
<dd><p>Render stencil or color page.</p>
</dd></dl>
<dl class="data">
<dt id="djvu.decode.djvu.decode.RENDER_COLOR_ONLY">
<tt class="descclassname">djvu.decode.</tt><tt class="descname">RENDER_COLOR_ONLY</tt><a class="headerlink" href="#djvu.decode.djvu.decode.RENDER_COLOR_ONLY" title="Permalink to this definition">¶</a></dt>
<dd><p>Render color page or fail.</p>
</dd></dl>
<dl class="data">
<dt id="djvu.decode.djvu.decode.RENDER_MASK_ONLY">
<tt class="descclassname">djvu.decode.</tt><tt class="descname">RENDER_MASK_ONLY</tt><a class="headerlink" href="#djvu.decode.djvu.decode.RENDER_MASK_ONLY" title="Permalink to this definition">¶</a></dt>
<dd><p>Render stencil or fail.</p>
</dd></dl>
<dl class="data">
<dt id="djvu.decode.djvu.decode.RENDER_BACKGROUND">
<tt class="descclassname">djvu.decode.</tt><tt class="descname">RENDER_BACKGROUND</tt><a class="headerlink" href="#djvu.decode.djvu.decode.RENDER_BACKGROUND" title="Permalink to this definition">¶</a></dt>
<dd><p>Render color background layer.</p>
</dd></dl>
<dl class="data">
<dt id="djvu.decode.djvu.decode.RENDER_FOREGROUND">
<tt class="descclassname">djvu.decode.</tt><tt class="descname">RENDER_FOREGROUND</tt><a class="headerlink" href="#djvu.decode.djvu.decode.RENDER_FOREGROUND" title="Permalink to this definition">¶</a></dt>
<dd><p>Render color foreground layer.</p>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Geometry and colors</a><ul>
<li><a class="reference internal" href="#geometry">Geometry</a><ul>
<li><a class="reference internal" href="#transformations">Transformations</a></li>
</ul>
</li>
<li><a class="reference internal" href="#pixel-formats">Pixel formats</a></li>
<li><a class="reference internal" href="#render-modes">Render modes</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="pages.html"
title="previous chapter">Document pages</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="files.html"
title="next chapter">Document files</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/geometry.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="files.html" title="Document files"
>next</a></li>
<li class="right" >
<a href="pages.html" title="Document pages"
>previous</a> |</li>
<li><a href="index.html">python-djvulibre 0.3.9 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2007-2011 Jakub Wilk <jwilk@jwilk.net>.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>
|