PHP Doku:: Draws a line - function.ps-lineto.html

Verlauf / Chronik / History: (8) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzNon-Text MIME-AusgabenPostScript document creationPS Funktionenps_lineto

Ein Service von Reinhard Neidl - Webprogrammierung.

PS Funktionen

<<ps_include_file

ps_makespotcolor>>

ps_lineto

(PECL ps >= 1.1.0)

ps_linetoDraws a line

Beschreibung

bool ps_lineto ( resource $psdoc , float $x , float $y )

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.

Parameter-Liste

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.

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.

Beispiele

Beispiel #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($ps596842);
ps_moveto($ps100100);
ps_lineto($ps100200);
ps_lineto($ps200200);
ps_lineto($ps200100);
ps_lineto($ps100100);
ps_stroke($ps);
ps_end_page($ps);

ps_delete($ps);
?>

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)