Class: PDF::Writer::State
- Defined in:
- lib/extensions/pdf-writer/pdf/writer/state.rb
Instance Attribute Summary collapse
-
#fill_color ⇒ Object
Returns the value of attribute fill_color.
-
#stroke_color ⇒ Object
Returns the value of attribute stroke_color.
-
#stroke_style ⇒ Object
Returns the value of attribute stroke_style.
-
#text_render_style ⇒ Object
Returns the value of attribute text_render_style.
Instance Method Summary collapse
- #blank? ⇒ Boolean
-
#initialize(vals = {}) {|_self| ... } ⇒ State
constructor
A new instance of State.
Constructor Details
#initialize(vals = {}) {|_self| ... } ⇒ State
Returns a new instance of State.
18 19 20 21 22 23 24 25 |
# File 'lib/extensions/pdf-writer/pdf/writer/state.rb', line 18 def initialize(vals = {}) @fill_color = vals[:fill_color] @stroke_color = vals[:stroke_color] @text_render_style = vals[:text_render_style] @stroke_style = vals[:stroke_style] yield self if block_given? end |
Instance Attribute Details
#fill_color ⇒ Object
Returns the value of attribute fill_color.
13 14 15 |
# File 'lib/extensions/pdf-writer/pdf/writer/state.rb', line 13 def fill_color @fill_color end |
#stroke_color ⇒ Object
Returns the value of attribute stroke_color.
14 15 16 |
# File 'lib/extensions/pdf-writer/pdf/writer/state.rb', line 14 def stroke_color @stroke_color end |
#stroke_style ⇒ Object
Returns the value of attribute stroke_style.
16 17 18 |
# File 'lib/extensions/pdf-writer/pdf/writer/state.rb', line 16 def stroke_style @stroke_style end |
#text_render_style ⇒ Object
Returns the value of attribute text_render_style.
15 16 17 |
# File 'lib/extensions/pdf-writer/pdf/writer/state.rb', line 15 def text_render_style @text_render_style end |
Instance Method Details
#blank? ⇒ Boolean
27 28 29 |
# File 'lib/extensions/pdf-writer/pdf/writer/state.rb', line 27 def blank? @fill_color.nil? and @stroke_color.nil? and @stroke_style.nil? end |