Module: Prawn::Graphics::Patterns
- Included in:
- Prawn::Graphics
- Defined in:
- lib/prawn/graphics/patterns.rb
Overview
Implements axial & radial gradients.
Defined Under Namespace
Classes: Gradient, GradientStop
Stable API collapse
-
#fill_gradient(*args, **kwargs) ⇒ Object
Sets the fill gradient.
-
#stroke_gradient(*args, **kwargs) ⇒ Object
Sets the stroke gradient.
Instance Method Details
#fill_gradient(from, to, color1, color2, apply_margin_options: false) ⇒ void #fill_gradient(from, r1, to, r2, color1, color2, apply_margin_options: false) ⇒ void #fill_gradient(from: , to: , r1: nil, r2: nil, stops: , apply_margin_options: true) ⇒ void
Sets the fill gradient.
105 106 107 |
# File 'lib/prawn/graphics/patterns.rb', line 105 def fill_gradient(*args, **kwargs) set_gradient(:fill, *args, **kwargs) end |
#fill_gradient(from, to, color1, color2, apply_margin_options: false) ⇒ void #fill_gradient(from, r1, to, r2, color1, color2, apply_margin_options: false) ⇒ void #fill_gradient(from: , to: , r1: nil, r2: nil, stops: , apply_margin_options: true) ⇒ void
Sets the stroke gradient.
194 195 196 |
# File 'lib/prawn/graphics/patterns.rb', line 194 def stroke_gradient(*args, **kwargs) set_gradient(:stroke, *args, **kwargs) end |