array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.ps-setpolydash.php', 1 => 'ps_setpolydash', ), 'up' => array ( 0 => 'ref.ps.php', 1 => 'PS Funktionen', ), 'prev' => array ( 0 => 'function.ps-setoverprintmode.php', 1 => 'ps_setoverprintmode', ), 'next' => array ( 0 => 'function.ps-shading-pattern.php', 1 => 'ps_shading_pattern', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ps/functions/ps-setpolydash.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ps >= 1.1.0)
ps_setpolydash — Sets appearance of a dashed line
Sets the length of the black and white portions of a dashed line. ps_setpolydash() is used to set more complicated dash patterns.
psdoc
Resource identifier of the postscript file as returned by ps_new().
arr
arr
is a list of length elements alternately for
the black and white portion.
Beispiel #1 Drawing a dashed line
<?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);
?>
This example draws a line with a 10 and 2 points long line, and gaps of 5 points inbetween.