function.ps-setcolor.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 183 行
HTML
183 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Sets current color</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ps-set-value.html">ps_set_value</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ps-setdash.html">ps_setdash</a></div> <div class="up"><a href="ref.ps.html">PS Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.ps-setcolor" class="refentry"> <div class="refnamediv"> <h1 class="refname">ps_setcolor</h1> <p class="verinfo">(PECL ps:1.1.0-1.3.5)</p><p class="refpurpose"><span class="refname">ps_setcolor</span> — <span class="dc-title">Sets current color</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><b><b>ps_setcolor</b></b></span> ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$psdoc</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$type</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$colorspace</tt></span> , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$c1</tt></span> , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$c2</tt></span> , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$c3</tt></span> , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$c4</tt></span> )</div> <p class="para rdfs-comment"> Sets the color for drawing, filling, or both. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">psdoc</tt></i></span> <dd> <p class="para"> Resource identifier of the postscript file as returned by <a href="function.ps-new.html" class="function">ps_new()</a>. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">type</tt></i></span> <dd> <p class="para"> The parameter <i><tt class="parameter">type</tt></i> can be <i>both</i>, <i>fill</i>, or <i>fillstroke</i>. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">colorspace</tt></i></span> <dd> <p class="para"> The colorspace should be one of <i>gray</i>, <i>rgb</i>, <i>cmyk</i>, <i>spot</i>, <i>pattern</i>. Depending on the colorspace either only the first, the first three or all parameters will be used. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">c1</tt></i></span> <dd> <p class="para"> Depending on the colorspace this is either the red component (rgb), the cyan component (cmyk), the gray value (gray), the identifier of the spot color or the identifier of the pattern. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">c2</tt></i></span> <dd> <p class="para"> Depending on the colorspace this is either the green component (rgb), the magenta component (cmyk). </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">c3</tt></i></span> <dd> <p class="para"> Depending on the colorspace this is either the blue component (rgb), the yellow component (cmyk). </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">c4</tt></i></span> <dd> <p class="para"> This must only be set in cmyk colorspace and specifies the black component. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 unknown"> <h3 class="title">Bugs</h3> <p class="para"> The second parameter is currently not always evaluated. The color is sometimes set for filling and drawing just as if <i>fillstroke</i> were passed. </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure. </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ps-set-value.html">ps_set_value</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ps-setdash.html">ps_setdash</a></div> <div class="up"><a href="ref.ps.html">PS Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?