📄 function.ps-shading.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Creates a shading for later use</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-shading-pattern.html">ps_shading_pattern</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ps-shfill.html">ps_shfill</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-shading" class="refentry"> <div class="refnamediv"> <h1 class="refname">ps_shading</h1> <p class="verinfo">(PECL ps:1.3.0-1.3.5)</p><p class="refpurpose"><span class="refname">ps_shading</span> — <span class="dc-title">Creates a shading for later use</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">int</span> <span class="methodname"><b><b>ps_shading</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">float</span> <tt class="parameter">$x0</tt></span> , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$y0</tt></span> , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$x1</tt></span> , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$y1</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> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$optlist</tt></span> )</div> <p class="para rdfs-comment"> Creates a shading, which can be used by <a href="function.ps-shfill.html" class="function">ps_shfill()</a> or <a href="function.ps-shading-pattern.html" class="function">ps_shading_pattern()</a>. </p> <p class="para"> The color of the shading can be in any color space except for <i>pattern</i>. </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 type of shading can be either <i>radial</i> or <i>axial</i>. Each shading starts with the current fill color and ends with the given color values passed in the parameters <i><tt class="parameter">c1</tt></i> to <i><tt class="parameter">c4</tt></i> (see <a href="function.ps-setcolor.html" class="function">ps_setcolor()</a> for their meaning). </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">x0, x1, y0, y1</tt></i></span> <dd> <p class="para"> The coordinates <i><tt class="parameter">x0</tt></i>, <i><tt class="parameter">y0</tt></i>, <i><tt class="parameter">x1</tt></i>, <i><tt class="parameter">y1</tt></i> are the start and end point of the shading. If the type of shading is <i>radial</i> the two points are the middle points of a starting and ending circle. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">c1, c2, c3, c4</tt></i></span> <dd> <p class="para"> See <a href="function.ps-setcolor.html" class="function">ps_setcolor()</a> for their meaning. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">optlist</tt></i></span> <dd> <p class="para"> If the shading is of type <i>radial</i> the <i><tt class="parameter">optlist</tt></i> must also contain the parameters <i>r0</i> and <i>r1</i> with the radius of the start and end circle. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the identifier of the pattern or <b><tt>FALSE</tt></b> in case of an error. </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.ps-shading-pattern.html" class="function" rel="rdfs-seeAlso">ps_shading_pattern()</a></li> <li class="member"><a href="function.ps-shfill.html" class="function" rel="rdfs-seeAlso">ps_shfill()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ps-shading-pattern.html">ps_shading_pattern</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ps-shfill.html">ps_shfill</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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -