Class: PDF::Writer::State

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf/writer/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vals = {}) {|_self| ... } ⇒ State

Returns a new instance of State.

Yields:

  • (_self)

Yield Parameters:



18
19
20
21
22
23
24
25
# File 'lib/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_colorObject

Returns the value of attribute fill_color.



13
14
15
# File 'lib/pdf/writer/state.rb', line 13

def fill_color
  @fill_color
end

#stroke_colorObject

Returns the value of attribute stroke_color.



14
15
16
# File 'lib/pdf/writer/state.rb', line 14

def stroke_color
  @stroke_color
end

#stroke_styleObject

Returns the value of attribute stroke_style.



16
17
18
# File 'lib/pdf/writer/state.rb', line 16

def stroke_style
  @stroke_style
end

#text_render_styleObject

Returns the value of attribute text_render_style.



15
16
17
# File 'lib/pdf/writer/state.rb', line 15

def text_render_style
  @text_render_style
end

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/pdf/writer/state.rb', line 27

def blank?
  @fill_color.nil? and @stroke_color.nil? and @stroke_style.nil?
end