array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.ps-lineto.php', 1 => 'ps_lineto', ), 'up' => array ( 0 => 'ref.ps.php', 1 => 'PS İşlevleri', ), 'prev' => array ( 0 => 'function.ps-include-file.php', 1 => 'ps_include_file', ), 'next' => array ( 0 => 'function.ps-makespotcolor.php', 1 => 'ps_makespotcolor', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ps/functions/ps-lineto.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ps >= 1.1.0)
ps_lineto — Draws a line
Adds a straight line from the current point to the given coordinates to the current path. Use ps_moveto() to set the starting point of the line.
psdoc
Resource identifier of the postscript file as returned by ps_new().
x
x-coordinate of the end point of the line.
y
y-coordinate of the end point of the line.
Örnek 1 Drawing a rectangle
<?php
$ps = ps_new();
if (!ps_open_file($ps, "rectangle.ps")) {
print "Cannot open PostScript file\n";
exit;
}
ps_set_info($ps, "Creator", "rectangle.php");
ps_set_info($ps, "Author", "Uwe Steinmann");
ps_set_info($ps, "Title", "Lineto example");
ps_begin_page($ps, 596, 842);
ps_moveto($ps, 100, 100);
ps_lineto($ps, 100, 200);
ps_lineto($ps, 200, 200);
ps_lineto($ps, 200, 100);
ps_lineto($ps, 100, 100);
ps_stroke($ps);
ps_end_page($ps);
ps_delete($ps);
?>