Php/docs/function.ps-shading
来自菜鸟教程
ps_shading
(PECL ps >= 1.3.0)
ps_shading — Creates a shading for later use
说明
ps_shading
( resource $psdoc
, string $type
, float $x0
, float $y0
, float $x1
, float $y1
, float $c1
, float $c2
, float $c3
, float $c4
, string $optlist
) : int|false
Creates a shading, which can be used by ps_shfill() or ps_shading_pattern().
The color of the shading can be in any color space except for
pattern.
参数
psdoc- Resource identifier of the postscript file as returned by ps_new().
type- The type of shading can be either
radialoraxial. Each shading starts with the current fill color and ends with the given color values passed in the parametersc1toc4(see ps_setcolor() for their meaning). x0, x1, y0, y1- The coordinates
x0,y0,x1,y1are the start and end point of the shading. If the type of shading isradialthe two points are the middle points of a starting and ending circle. c1, c2, c3, c4- See ps_setcolor() for their meaning.
optlist- If the shading is of type
radialtheoptlistmust also contain the parametersr0andr1with the radius of the start and end circle.
返回值
Returns the identifier of the pattern 或者在失败时返回 false.
参见
- ps_shading_pattern() - Creates a pattern based on a shading
- ps_shfill() - Fills an area with a shading