ps_makespotcolor

(PECL ps:1.1.0-1.3.5)

ps_makespotcolor — Create spot color

Описание

int ps_makespotcolor ( resource $psdoc , string $name [, float $reserved ] )

Creates a spot color from the current fill color. The fill color must be defined in rgb, cmyk or gray colorspace. The spot color name can be an arbitrary name. A spot color can be set as any color with ps_setcolor(). When the document is not printed but displayed by an postscript viewer the given color in the specified color space is use.

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

psdoc

Resource identifier of the postscript file as returned by ps_new().

name

Name of the spot color, e.g. Pantone 5565.

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

The id of the new spot color or 0 in case of an error.

Примеры

Пример #1 Creating and using a spot color

<?php
$ps 
ps_new();
if (!
ps_open_file($ps"spotcolor.ps")) {
  print 
"Cannot open PostScript file\n";
  exit;
}

ps_set_info($ps"Creator""spotcolor.php");
ps_set_info($ps"Author""Uwe Steinmann");
ps_set_info($ps"Title""Spot color example");

ps_begin_page($ps596842);
ps_setcolor($ps"fill""cmyk"0.370.00.340.34);
$spotcolor ps_makespotcolor($ps"PANTONE 5565 C"0);
ps_setcolor($ps"fill""spot"$spotcolor0.50.00.0);
ps_moveto($ps100100);
ps_lineto($ps100200);
ps_lineto($ps200200);
ps_lineto($ps200100);
ps_lineto($ps100100);
ps_fill($ps);
ps_end_page($ps);

ps_delete($ps);
?>

This example creates the spot color "PANTONE 5565 C" which is a darker green (olive) and fills a rectangle with 50% intensity.

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

Коментарии

404 Not Found

404 Not Found


nginx

    Поддержать сайт на родительском проекте КГБ