mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 19:08:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
132 lines
3.5 KiB
XML
132 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
|
<refentry xml:id="function.ps-makespotcolor" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ps_makespotcolor</refname>
|
|
<refpurpose>Create spot color</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>ps_makespotcolor</methodname>
|
|
<methodparam><type>resource</type><parameter>psdoc</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>reserved</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
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
|
|
<function>ps_setcolor</function>. When the document is not printed
|
|
but displayed by an postscript viewer the given color in the specified
|
|
color space is use.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>psdoc</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Resource identifier of the postscript file
|
|
as returned by <function>ps_new</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Name of the spot color, e.g. Pantone 5565.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
The id of the new spot color or 0 in case of an error.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Creating and using a spot color</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?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($ps, 596, 842);
|
|
ps_setcolor($ps, "fill", "cmyk", 0.37, 0.0, 0.34, 0.34);
|
|
$spotcolor = ps_makespotcolor($ps, "PANTONE 5565 C", 0);
|
|
ps_setcolor($ps, "fill", "spot", $spotcolor, 0.5, 0.0, 0.0);
|
|
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_fill($ps);
|
|
ps_end_page($ps);
|
|
|
|
ps_delete($ps);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
This example creates the spot color "PANTONE 5565 C" which
|
|
is a darker green (olive) and fills a rectangle with 50% intensity.
|
|
</para>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>ps_setcolor</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|