Home > PHP > Function > PS > ps_shading()

ps_shading()

ps_shading - Creates a shading for later use

Syntax

int ps_shading (resource $psdoc, string $type, float $x0, float $y0, float $x1, float $y1, float $c1, float $c2, float $c3, float $c4, string $optlist)

Arguments

  • psdoc - Resource identifier of the postscript file as returned by ps_new().
  • type - The type of shading can be either radialor axial. Each shading starts with the current fill color and ends with the given color values passed in the parameters c1 to c4 (see ps_setcolor() for their meaning).
  • x0 - The coordinates x0, y0, x1, y1 are the start and end point of the shading. If the type of shading is radialthe two points are the middle points of a starting and ending circle.
  • y0 - See ps_setcolor() for their meaning.
  • x1 - If the shading is of type radialthe optlist must also contain the parameters r0and r1with the radius of the start and end circle.
  • y1
  • c1
  • c2
  • c3
  • c4
  • optlist

Description

Creates a shading, which can be used by ps_shfill() or ps_shading_pattern().

Version

PHP PECL ps >= 1.3.0

Return value

Returns the identifier of the pattern or FALSE on failure.