function.ps-show-boxed.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 441 行

HTML
441
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Output text in a box</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ps-shfill.html">ps_shfill</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ps-show-xy2.html">ps_show_xy2</a></div> <div class="up"><a href="ref.ps.html">PS Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.ps-show-boxed" class="refentry"> <div class="refnamediv">  <h1 class="refname">ps_show_boxed</h1>  <p class="verinfo">(PECL ps:1.1.0-1.3.5)</p><p class="refpurpose"><span class="refname">ps_show_boxed</span> &mdash; <span class="dc-title">Output text in a box</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">int</span> <span class="methodname"><b><b>ps_show_boxed</b></b></span>    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$psdoc</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$text</tt></span>   , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$left</tt></span>   , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$bottom</tt></span>   , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$width</tt></span>   , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$height</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$hmode</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$feature</tt></span>  ] )</div>  <p class="para rdfs-comment">   Outputs a text in a given box. The lower left corner of the box is at   (<i><tt class="parameter">left</tt></i>, <i><tt class="parameter">bottom</tt></i>). Line breaks   will be inserted where needed. Multiple spaces are treated as one.   Tabulators are treated as spaces.  </p>  <p class="para">   The text will be hyphenated if the parameter   <i><tt class="parameter">hyphenation</tt></i> is set to <i>true</i>   and the parameter <i><tt class="parameter">hyphendict</tt></i> contains a valid   filename for a hyphenation   file. The line spacing is taken from the value <i>leading</i>.   Paragraphs can be   separated by an empty line just like in TeX. If the value   <i>parindent</i> is   set to value &gt; 0.0 then the first n lines will be indented. The number n   of lines is set by the parameter <i>numindentlines</i>.   In order to prevent   indenting of the first m paragraphs set the value   <i>parindentskip</i> to a   positive number.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">psdoc</tt></i></span>     <dd>      <p class="para">       Resource identifier of the postscript file       as returned by <a href="function.ps-new.html" class="function">ps_new()</a>.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">text</tt></i></span>     <dd>      <p class="para">       The text to be output into the given box.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">left</tt></i></span>     <dd>      <p class="para">       x-coordinate of the lower left corner of the box.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">bottom</tt></i></span>     <dd>      <p class="para">       y-coordinate of the lower left corner of the box.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">width</tt></i></span>     <dd>      <p class="para">       Width of the box.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">height</tt></i></span>     <dd>      <p class="para">       Height of the box.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">hmode</tt></i></span>     <dd>      <p class="para">       The parameter <i><tt class="parameter">hmode</tt></i> can be &quot;justify&quot;,       &quot;fulljustify&quot;, &quot;right&quot;, &quot;left&quot;, or &quot;center&quot;. The difference of       &quot;justify&quot; and &quot;fulljustify&quot; just affects the last line of the box. In       fulljustify mode the last line will be left and right justified unless       this is also the last line of paragraph. In justify mode it will always       be left justified.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">feature</tt></i></span>     <dd>      <p class="para">             </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 unknown">  <h3 class="title">Used parameters</h3>  <p class="para">   The output of <b>ps_show_boxed()</b> can be configured with   several parameters and values which must be set with either   <a href="function.ps-set-parameter.html" class="function">ps_set_parameter()</a> or <a href="function.ps-set-value.html" class="function">ps_set_value()</a>.   Beside the parameters and values which affect text output, the following   parameters and values are evaluated.   <dl>    <dt>     <span class="term">leading (value)</span>     <dd>      <p class="para">Distance between baselines of two consecutive lines.</p>     </dd>    </dt>    <dt>     <span class="term">linebreak (parameter)</span>     <dd>      <p class="para">       Set to &quot;true&quot; if you want a carriage return to start a new line instead       of treating it as a space. Defaults to &quot;false&quot;.      </p>     </dd>    </dt>    <dt>     <span class="term">parbreak (parameter)</span>     <dd>      <p class="para">       Set to &quot;true&quot; if you want a carriage return on a single line to start a       new paragraph instead of treating it as a space. Defaults to &quot;true&quot;.      </p>     </dd>    </dt>    <dt>     <span class="term">hyphenation (parameter)</span>     <dd>      <p class="para">       Set to &quot;true&quot; in order to turn hyphenation on. This requires a       dictionary to be set with the parameter &quot;hyphendict&quot;. Defaults to       &quot;false&quot;.      </p>     </dd>    </dt>    <dt>     <span class="term">hyphendict (parameter)</span>     <dd>      <p class="para">       Filename of the dictionary used for hyphenation pattern (see below).      </p>     </dd>    </dt>    <dt>     <span class="term">hyphenminchar (value)</span>     <dd>      <p class="para">       The number of chars which must at least be left over before or after       the hyphen. This implies that only words of at least two times this       value will be hyphenated. The default value is three. Setting a value       of zero will result in the default value.      </p>     </dd>    </dt>    <dt>     <span class="term">parindent (value)</span>     <dd>      <p class="para">       Set the amount of space in pixel for indenting the first m lines of a       paragraph. m can be set with the value &quot;numindentlines&quot;.      </p>     </dd>    </dt>    <dt>     <span class="term">parskip (value)</span>     <dd>      <p class="para">       Set the amount of extra space in pixel between paragraphs. Defaults to       0 which will result in a normal line distance.      </p>     </dd>    </dt>    <dt>     <span class="term">numindentlines (value)</span>     <dd>      <p class="para">       Number of lines from the start of the paragraph which will be indented.       Defaults to 1.      </p>     </dd>    </dt>    <dt>     <span class="term">parindentskip (value)</span>     <dd>      <p class="para">       Number of paragraphs in the box whose first lines will not be indented.       This defaults to 0. This is useful for paragraphs right after a section       heading or text being continued in a second box. In both case one would       set this to 1.      </p>     </dd>    </dt>    <dt>     <span class="term">linenumbermode (parameter)</span>     <dd>      <p class="para">       Set how lines are to be numbered. Possible values are &quot;box&quot; for       numbering lines in the whole box or &quot;paragraph&quot; to number lines within       each paragraph.      </p>     </dd>    </dt>    <dt>     <span class="term">linenumberspace (value)</span>     <dd>      <p class="para">       The space for the column left of the numbered line containing the line       number. The line number will be right justified into this column.       Defaults to 20.      </p>     </dd>    </dt>    <dt>     <span class="term">linenumbersep (value)</span>     <dd>      <p class="para">       The space between the column with line numbers and the line itself.       Defaults to 5.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 unknown">  <h3 class="title">Hyphenation</h3>  <p class="para">   Text is hyphenated if the parameter <i>hyphenation</i> is set   to true and a valid hyphenation dictionary is set. pslib does not ship its own   hyphenation dictionary but uses one from openoffice, scribus or koffice.   You can find their dictionaries for different languages in one of the   following directories if the software is installed:   <ul class="simplelist">    <li class="member">     <var class="filename">/usr/share/apps/koffice/hyphdicts/</var>    </li>    <li class="member">     <var class="filename">/usr/lib/scribus/dicts/</var>    </li>    <li class="member">     <var class="filename">/usr/lib/openoffice/share/dict/ooo/</var>    </li>   </ul>   Currently scribus appears to have the most complete hyphenation   dictionaries.  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Number of characters that could not be written.  </p> </div> <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="function.ps-continue-text.html" class="function" rel="rdfs-seeAlso">ps_continue_text()</a></li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ps-shfill.html">ps_shfill</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ps-show-xy2.html">ps_show_xy2</a></div> <div class="up"><a href="ref.ps.html">PS Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?