PHP: ps_setpolydash - Manual

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

search for in the

ps_shading_pattern ps_setmiterlimit

Last updated: Sat, 27 Jan 2007

view this page in

# ps_setpolydash

(PECL)

ps_setpolydash -- Sets 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` в случае возникновения ошибки.

## Примеры

Пример 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.

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

ps_setdash()

add a note User Contributed Notes
ps_setpolydash
There are no user contributed notes for this page.
ps_shading_pattern ps_setmiterlimit

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