php-doc-en/reference/ps/functions/ps-setpolydash.xml
Hannes Magnusson c030e2adf7 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-20 22:25:43 +00:00

124 lines
2.9 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
<refentry xml:id="function.ps-setpolydash" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ps_setpolydash</refname>
<refpurpose>Sets appearance of a dashed line</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>ps_setpolydash</methodname>
<methodparam><type>resource</type><parameter>psdoc</parameter></methodparam>
<methodparam><type>float</type><parameter>arr</parameter></methodparam>
</methodsynopsis>
<para>
Sets the length of the black and white portions of a dashed line.
<function>ps_setpolydash</function> is used to set more complicated dash
patterns.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>psdoc</parameter></term>
<listitem>
<para>
Resource identifier of the postscript file
as returned by <function>ps_new</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>arr</parameter></term>
<listitem>
<para>
<parameter>arr</parameter> is a list of length elements alternately for
the black and white portion.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Drawing a dashed line</title>
<programlisting role="php">
<![CDATA[
<?php
$ps = ps_new();
if (!ps_open_file($ps, "polydash.ps")) {
print "Cannot open PostScript file\n";
exit;
}
ps_set_info($ps, "Creator", "polydash.php");
ps_set_info($ps, "Author", "Uwe Steinmann");
ps_set_info($ps, "Title", "Poly dash example");
ps_begin_page($ps, 596, 842);
ps_setpolydash($ps, array(10, 5, 2, 5));
ps_moveto($ps, 100, 100);
ps_lineto($ps, 200, 200);
ps_stroke($ps);
ps_end_page($ps);
ps_delete($ps);
?>
]]>
</programlisting>
<para>
This example draws a line with a 10 and 2 points long line, and
gaps of 5 points inbetween.
</para>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>ps_setdash</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->