update : 2015.11.03
php.shukuma.com

검색:
 
 
Sets appearance of a dashed line

ps_setpolydash

(PECL ps >= 1.1.0)

ps_setpolydashSets appearance of a dashed line

설명

bool ps_setpolydash ( resource $psdoc , float $arr )

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.

반환값

성공 시 TRUE를, 실패 시 FALSE를 반환합니다.

예제

Example #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($ps596842);
ps_setpolydash($ps, array(10525));
ps_moveto($ps100100);
ps_lineto($ps200200);
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.

참고