PHP Manual
Prev |  | Next

# pdf_setcolor

(PHP 4 >= 4.0.5)

pdf_setcolor -- Sets fill and stroke color to CMYK values

## Description

``void pdf_setcolor` (int pdf object, string type, string colorspace, float c1 [, float c2 [, float c3 [, float c4]]])`

Set the current color space and color. The parameter `type` can be "fill", "stroke", or "both" to specify that the color is set for filling, stroking or both filling and stroking. The parameter `colorspace` can be `gray`, `rgb`, `cmyk`, `spot` or `pattern`. The parameters `c1`, `c2`, `c3` and `c4` represent the color components for the color space specified by `colorspace`. For `gray` only `c1` is used. For `rgb` parameters `c1`, `c2`, and `c3` specify the Red, Green amd Blue values respectively. For `cmyk` parameters `c1`, `c2`, `c3`, and `c4` specify the Cyan, Magenta, Yellow and Black values respectively. For `spot` `c1` specifies a spot color handles returned by pdf_makespotcolor() and `c2` specifies a tint value between 0 and 1. For `pattern` `c1` specifies a pattern handle returned by pdf_begin_pattern().

Prev | Home | Next
pdf_scale | Up | pdf_setdash