Method: RBPDF#SetFillColorArray

Defined in:
lib/rbpdf.rb

#SetFillColorArray(color) ⇒ Object Also known as: set_fill_color_array

Defines the color used for all filling operations (filled rectangles and cell backgrounds). 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 array or ordered hash :color

array(or ordered hash) of colors

@access public
@since 3.1.000 (2008-6-11)
@see

SetFillColor()



2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
# File 'lib/rbpdf.rb', line 2328

def SetFillColorArray(color)
  if !color.nil?
    color = color.values if color.is_a? Hash
    r = !color[0].nil? ? color[0] : -1
    g = !color[1].nil? ? color[1] : -1
    b = !color[2].nil? ? color[2] : -1
    k = !color[3].nil? ? color[3] : -1
    if r >= 0
      SetFillColor(r, g, b, k)
    end
  end
end