Method: RBPDF#AddSpotColor
- Defined in:
- lib/rbpdf.rb
#AddSpotColor(name, c, m, y, k) ⇒ Object Also known as: add_spot_color
Defines a new spot color. It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
- @param int :c
-
Cyan color for CMYK. Value between 0 and 255
- @param int :m
-
Magenta color for CMYK. Value between 0 and 255
- @param int :y
-
Yellow color for CMYK. Value between 0 and 255
- @param int :k
-
Key (Black) color for CMYK. Value between 0 and 255
- @access public
- @since 4.0.024 (2008-09-12)
- @see
-
SetDrawSpotColor(), SetFillSpotColor(), SetTextSpotColor()
2242 2243 2244 2245 2246 2247 |
# File 'lib/rbpdf.rb', line 2242 def AddSpotColor(name, c, m, y, k) if @spot_colors[name].nil? i = 1 + @spot_colors.length @spot_colors[name] = {'i' => i, 'c' => c, 'm' => m, 'y' => y, 'k' => k} end end |