Class: Prawn::Document
- Inherits:
-
Object
- Object
- Prawn::Document
- Defined in:
- lib/qhandout.rb
Instance Method Summary collapse
- #text_with_shadow(*text_args) ⇒ Object
- #texts(lines, *parameters) ⇒ Object
- #with_shadow(parameters = {}) ⇒ Object
Instance Method Details
#text_with_shadow(*text_args) ⇒ Object
36 37 38 39 40 |
# File 'lib/qhandout.rb', line 36 def text_with_shadow(*text_args) with_shadow do text *text_args end end |
#texts(lines, *parameters) ⇒ Object
11 12 13 14 15 |
# File 'lib/qhandout.rb', line 11 def texts(lines, *parameters) lines.each do |line| text line, *parameters end end |
#with_shadow(parameters = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/qhandout.rb', line 17 def with_shadow(parameters = {}) shadow_color = parameters[:color] || GRAY depth = parameters[:depth] || 0.5.mm original_cursor = cursor original_fill_color = fill_color fill_color shadow_color move_down depth indent depth do yield end move_cursor_to original_cursor fill_color original_fill_color yield end |