PHP: ps_lineto - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ps_makespotcolor ps_hyphenate

Last updated: Sat, 27 Jan 2007

view this page in

# ps_lineto

(PECL)

ps_lineto -- Draws a line

## Описание

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.

## Список параметров

`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.

## Возвращаемые значения

Возвращает `TRUE` в случае успешного завершения или `FALSE` в случае возникновения ошибки.

## Примеры

Пример 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);
?>`

## Смотрите также

ps_moveto()

add a note User Contributed Notes
ps_lineto
There are no user contributed notes for this page.
ps_makespotcolor ps_hyphenate

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST