Module: Prawn::Graphics::Patterns

Included in:
Prawn::Graphics
Defined in:
lib/prawn/graphics/patterns.rb

Stable API collapse

Instance Method Details

#fill_gradient(*args) ⇒ Object

Sets the fill gradient from color1 to color2. old arguments: point, width, height, color1, color2, options = {} new arguments: from, to, color1, color1

or  from, r1, to, r2, color1, color2


19
20
21
# File 'lib/prawn/graphics/patterns.rb', line 19

def fill_gradient(*args)
  set_gradient(:fill, *args)
end

#stroke_gradient(*args) ⇒ Object

Sets the stroke gradient from color1 to color2. old arguments: point, width, height, color1, color2, options = {} new arguments: from, to, color1, color2

or  from, r1, to, r2, color1, color2


27
28
29
# File 'lib/prawn/graphics/patterns.rb', line 27

def stroke_gradient(*args)
  set_gradient(:stroke, *args)
end