Commit dd45f1fc authored by Etienne Nadji's avatar Etienne Nadji
Browse files

modifié : _modules/pyscribus/dimensions.html

	modifié :         _modules/pyscribus/pageobjects.html
	modifié :         _modules/pyscribus/pages.html
	modifié :         _modules/pyscribus/styles.html
	modifié :         genindex.html
	modifié :         objects.inv
	modifié :         pyscribus.html
	modifié :         searchindex.js
parent 6aa7d3ad
......@@ -240,6 +240,8 @@
<span class="sd"> +-------------------------+---------------+</span>
<span class="sd"> | Line per inch (LPI) | lpi |</span>
<span class="sd"> +-------------------------+---------------+</span>
<span class="sd"> | Second | s, sec |</span>
<span class="sd"> +-------------------------+---------------+</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># 1 pica point = 25,4/72 milimeters</span>
......@@ -254,6 +256,7 @@
<span class="s2">&quot;deg&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;deg&quot;</span><span class="p">],</span>
<span class="s2">&quot;dpi&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;dpi&quot;</span><span class="p">,</span> <span class="s2">&quot;ppp&quot;</span><span class="p">,</span> <span class="s2">&quot;ppi&quot;</span><span class="p">],</span>
<span class="s2">&quot;lpi&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;lpi&quot;</span><span class="p">],</span>
<span class="s2">&quot;sec&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;s&quot;</span><span class="p">,</span> <span class="s2">&quot;sec&quot;</span><span class="p">]</span>
<span class="p">}</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="n">unit</span><span class="o">=</span><span class="s2">&quot;pica&quot;</span><span class="p">,</span> <span class="n">is_int</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">original_unit</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
......@@ -307,6 +310,12 @@
<span class="s2">&quot;LPI must be a positive number&quot;</span>
<span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">unit</span> <span class="o">==</span> <span class="s2">&quot;sec&quot;</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">int</span><span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">))</span> <span class="o">!=</span> <span class="nb">float</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">):</span>
<span class="k">raise</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">InvalidDim</span><span class="p">(</span>
<span class="s2">&quot;Second Dim must be an integer, is </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">unit</span> <span class="o">==</span> <span class="s2">&quot;cdeg&quot;</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span> <span class="o">&gt;=</span> <span class="mi">0</span><span class="p">:</span>
......@@ -369,6 +378,8 @@
<span class="sd"> +-------------------------+---------------+</span>
<span class="sd"> | Line per inch (LPI) | lpi |</span>
<span class="sd"> +-------------------------+---------------+</span>
<span class="sd"> | Second | s, sec |</span>
<span class="sd"> +-------------------------+---------------+</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">tmp_unit</span> <span class="o">=</span> <span class="n">unit</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
......@@ -381,6 +392,10 @@
<span class="n">valid_unit</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">break</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">unit</span> <span class="o">==</span> <span class="s2">&quot;sec&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">is_int</span> <span class="o">=</span> <span class="kc">True</span>
<span class="bp">self</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">return</span> <span class="n">valid_unit</span></div>
<span class="c1">#--- XML export ------------------------------------------------------</span>
......@@ -1158,7 +1173,7 @@
<span class="c1"># FIXME Remove that after implementation</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;PyScribus - Box rotation not implemented.&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Rotation degree :&quot;</span><span class="p">,</span> <span class="n">degree</span><span class="p">)</span>
<span class="c1"># print(&quot;Rotation degree :&quot;, degree)</span>
<span class="n">valid</span> <span class="o">=</span> <span class="kc">True</span>
......
......@@ -313,6 +313,8 @@
<span class="c1"># Undocumented box from gXpos, gYpos, gWidth, gHeight</span>
<span class="bp">self</span><span class="o">.</span><span class="n">gbox</span> <span class="o">=</span> <span class="n">dimensions</span><span class="o">.</span><span class="n">DimBox</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">use_embedded_icc</span> <span class="o">=</span> <span class="kc">False</span>
<span class="c1"># --- Page object own_page and linking/id --------------------</span>
<span class="c1"># NOTE FIXME Implemented because without it Scribus crashes, but</span>
......
This diff is collapsed.
......@@ -716,7 +716,7 @@
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">style_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;paragraph&quot;</span><span class="p">,</span> <span class="s2">&quot;character&quot;</span><span class="p">]:</span>
<span class="n">xml</span><span class="p">,</span> <span class="n">undoc_attribs</span> <span class="o">=</span> <span class="n">xmlc</span><span class="o">.</span><span class="n">all_undocumented_to_xml</span><span class="p">(</span>
<span class="n">xml</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">undocumented</span><span class="p">,</span> <span class="kc">True</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">style_type</span> <span class="o">+</span> <span class="s2">&quot; style&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">style_type</span> <span class="o">+</span> <span class="s2">&quot; style &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span>
<span class="p">)</span>
<span class="k">except</span> <span class="ne">AttributeError</span><span class="p">:</span>
......@@ -937,6 +937,16 @@
<span class="k">else</span><span class="p">:</span>
<span class="n">xml</span><span class="o">.</span><span class="n">attrib</span><span class="p">[</span><span class="n">case</span><span class="p">[</span><span class="mi">1</span><span class="p">]]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">indentations</span><span class="p">[</span><span class="n">case</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span><span class="o">.</span><span class="n">toxmlstr</span><span class="p">()</span>
<span class="c1">#--- Lists ------------------------------------------------------</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ul</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ol</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">InsaneSLAValue</span><span class="p">(</span>
<span class="s2">&quot;Style </span><span class="si">{}</span><span class="s2"> is both bullet and numeroted list.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">for</span> <span class="n">case</span> <span class="ow">in</span> <span class="p">[[</span><span class="s2">&quot;Bullet&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ul</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;Numeration&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ol</span><span class="p">]]:</span>
<span class="n">xml</span><span class="o">.</span><span class="n">attrib</span><span class="p">[</span><span class="n">case</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span> <span class="o">=</span> <span class="n">xmlc</span><span class="o">.</span><span class="n">bool_to_num</span><span class="p">(</span><span class="n">case</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
<span class="c1">#--- Parent character style ---------------------------------</span>
<span class="c1"># NOTE To not confuse with parent paragraph style which is</span>
......@@ -977,7 +987,7 @@
<span class="k">try</span><span class="p">:</span>
<span class="n">xml</span><span class="p">,</span> <span class="n">undoc_attribs</span> <span class="o">=</span> <span class="n">xmlc</span><span class="o">.</span><span class="n">all_undocumented_to_xml</span><span class="p">(</span>
<span class="n">xml</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">undocumented</span><span class="p">,</span> <span class="kc">True</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">style_type</span> <span class="o">+</span> <span class="s2">&quot; style&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">style_type</span> <span class="o">+</span> <span class="s2">&quot; style &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span>
<span class="p">)</span>
<span class="k">except</span> <span class="ne">AttributeError</span><span class="p">:</span>
......@@ -1145,7 +1155,7 @@
<span class="k">try</span><span class="p">:</span>
<span class="n">xml</span><span class="p">,</span> <span class="n">undoc_attribs</span> <span class="o">=</span> <span class="n">xmlc</span><span class="o">.</span><span class="n">all_undocumented_to_xml</span><span class="p">(</span>
<span class="n">xml</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">undocumented</span><span class="p">,</span> <span class="kc">True</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">style_type</span> <span class="o">+</span> <span class="s2">&quot; style&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">style_type</span> <span class="o">+</span> <span class="s2">&quot; style &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span>
<span class="p">)</span>
<span class="k">except</span> <span class="ne">AttributeError</span><span class="p">:</span>
......
......@@ -433,10 +433,18 @@
<li><a href="pyscribus.html#pyscribus.papers.ansi.E">E (class in pyscribus.papers.ansi)</a>
</li>
<li><a href="pyscribus.html#pyscribus.papers.afnor.Ecolier">Ecolier (class in pyscribus.papers.afnor)</a>
</li>
<li><a href="pyscribus.html#pyscribus.papers.afnor.Ecu">Ecu (class in pyscribus.papers.afnor)</a>
</li>
<li><a href="pyscribus.html#pyscribus.pages.PageAbstract.effect_direction_xml">effect_direction_xml (pyscribus.pages.PageAbstract attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pyscribus.html#pyscribus.papers.afnor.Ecu">Ecu (class in pyscribus.papers.afnor)</a>
<li><a href="pyscribus.html#pyscribus.pages.PageAbstract.effect_mobile_line_xml">effect_mobile_line_xml (pyscribus.pages.PageAbstract attribute)</a>
</li>
<li><a href="pyscribus.html#pyscribus.pages.PageAbstract.effect_source_xml">effect_source_xml (pyscribus.pages.PageAbstract attribute)</a>
</li>
<li><a href="pyscribus.html#pyscribus.pages.PageAbstract.effect_type_xml">effect_type_xml (pyscribus.pages.PageAbstract attribute)</a>
</li>
<li><a href="pyscribus.html#pyscribus.stories.Story.end_contents">end_contents() (pyscribus.stories.Story method)</a>
</li>
......
No preview for this file type
......@@ -830,6 +830,9 @@ itemattribute.ItemAttribute.attrib_types</p>
<tr class="row-odd"><td>Line per inch (LPI)</td>
<td>lpi</td>
</tr>
<tr class="row-even"><td>Second</td>
<td>s, sec</td>
</tr>
</tbody>
</table>
<dl class="attribute">
......@@ -839,7 +842,7 @@ itemattribute.ItemAttribute.attrib_types</p>
<dl class="attribute">
<dt id="pyscribus.dimensions.Dim.UNIT_ARGS">
<code class="descname">UNIT_ARGS</code><em class="property"> = {'cdeg': ['cdeg'], 'deg': ['deg'], 'dpi': ['dpi', 'ppp', 'ppi'], 'lpi': ['lpi'], 'mm': ['mm'], 'pcdecim': ['pcdecim', 'pcd'], 'perc': ['perc', 'pc'], 'pica': ['pica', 'pt']}</em><a class="headerlink" href="#pyscribus.dimensions.Dim.UNIT_ARGS" title="Permalink to this definition"></a></dt>
<code class="descname">UNIT_ARGS</code><em class="property"> = {'cdeg': ['cdeg'], 'deg': ['deg'], 'dpi': ['dpi', 'ppp', 'ppi'], 'lpi': ['lpi'], 'mm': ['mm'], 'pcdecim': ['pcdecim', 'pcd'], 'perc': ['perc', 'pc'], 'pica': ['pica', 'pt'], 'sec': ['s', 'sec']}</em><a class="headerlink" href="#pyscribus.dimensions.Dim.UNIT_ARGS" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
......@@ -955,6 +958,9 @@ itemattribute.ItemAttribute.attrib_types</p>
<tr class="row-odd"><td>Line per inch (LPI)</td>
<td>lpi</td>
</tr>
<tr class="row-even"><td>Second</td>
<td>s, sec</td>
</tr>
</tbody>
</table>
</dd></dl>
......@@ -3940,6 +3946,26 @@ floats</td>
<code class="descname">autoguides_origin_xml</code><em class="property"> = {'margins': '1', 'page': '0'}</em><a class="headerlink" href="#pyscribus.pages.PageAbstract.autoguides_origin_xml" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyscribus.pages.PageAbstract.effect_direction_xml">
<code class="descname">effect_direction_xml</code><em class="property"> = {'bottom-to-top': '2', 'left-to-right': '0', 'right-to-left': '3', 'tl-to-br': '4', 'top-to-bottom': '1'}</em><a class="headerlink" href="#pyscribus.pages.PageAbstract.effect_direction_xml" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyscribus.pages.PageAbstract.effect_mobile_line_xml">
<code class="descname">effect_mobile_line_xml</code><em class="property"> = {'horizontal': '0', 'vertical': 1}</em><a class="headerlink" href="#pyscribus.pages.PageAbstract.effect_mobile_line_xml" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyscribus.pages.PageAbstract.effect_source_xml">
<code class="descname">effect_source_xml</code><em class="property"> = {'external': '1', 'internal': '0'}</em><a class="headerlink" href="#pyscribus.pages.PageAbstract.effect_source_xml" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyscribus.pages.PageAbstract.effect_type_xml">
<code class="descname">effect_type_xml</code><em class="property"> = {'box': '2', 'break': '5', 'delete': '6', 'dissolve': '3', 'glitter': '4', 'masks': '1', 'none': '0'}</em><a class="headerlink" href="#pyscribus.pages.PageAbstract.effect_type_xml" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyscribus.pages.PageAbstract.fromdefault">
<code class="descname">fromdefault</code><span class="sig-paren">(</span><em>master=False</em>, <em>default=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyscribus/pages.html#PageAbstract.fromdefault"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyscribus.pages.PageAbstract.fromdefault" title="Permalink to this definition"></a></dt>
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment