Class: Prawn::SVG::State
- Inherits:
-
Object
- Object
- Prawn::SVG::State
- Defined in:
- lib/prawn/svg/state.rb
Instance Attribute Summary collapse
-
#computed_properties ⇒ Object
Returns the value of attribute computed_properties.
-
#inside_clip_path ⇒ Object
Returns the value of attribute inside_clip_path.
-
#inside_use ⇒ Object
Returns the value of attribute inside_use.
-
#last_fill_opacity ⇒ Object
Returns the value of attribute last_fill_opacity.
-
#last_stroke_opacity ⇒ Object
Returns the value of attribute last_stroke_opacity.
-
#opacity ⇒ Object
Returns the value of attribute opacity.
-
#preserve_space ⇒ Object
Returns the value of attribute preserve_space.
-
#stroke_width ⇒ Object
Returns the value of attribute stroke_width.
-
#text ⇒ Object
Returns the value of attribute text.
-
#viewport_sizing ⇒ Object
Returns the value of attribute viewport_sizing.
Instance Method Summary collapse
- #disable_drawing ⇒ Object
-
#initialize ⇒ State
constructor
A new instance of State.
- #initialize_dup(_other) ⇒ Object
Constructor Details
#initialize ⇒ State
Returns a new instance of State.
9 10 11 12 13 14 15 |
# File 'lib/prawn/svg/state.rb', line 9 def initialize @stroke_width = 1 @opacity = 1 @last_fill_opacity = 1 @last_stroke_opacity = 1 @computed_properties = Prawn::SVG::Properties.new.load_default_stylesheet end |
Instance Attribute Details
#computed_properties ⇒ Object
Returns the value of attribute computed_properties.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def computed_properties @computed_properties end |
#inside_clip_path ⇒ Object
Returns the value of attribute inside_clip_path.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def inside_clip_path @inside_clip_path end |
#inside_use ⇒ Object
Returns the value of attribute inside_use.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def inside_use @inside_use end |
#last_fill_opacity ⇒ Object
Returns the value of attribute last_fill_opacity.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def last_fill_opacity @last_fill_opacity end |
#last_stroke_opacity ⇒ Object
Returns the value of attribute last_stroke_opacity.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def last_stroke_opacity @last_stroke_opacity end |
#opacity ⇒ Object
Returns the value of attribute opacity.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def opacity @opacity end |
#preserve_space ⇒ Object
Returns the value of attribute preserve_space.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def preserve_space @preserve_space end |
#stroke_width ⇒ Object
Returns the value of attribute stroke_width.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def stroke_width @stroke_width end |
#text ⇒ Object
Returns the value of attribute text.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def text @text end |
#viewport_sizing ⇒ Object
Returns the value of attribute viewport_sizing.
2 3 4 |
# File 'lib/prawn/svg/state.rb', line 2 def end |
Instance Method Details
#disable_drawing ⇒ Object
21 22 23 |
# File 'lib/prawn/svg/state.rb', line 21 def disable_drawing inside_clip_path end |
#initialize_dup(_other) ⇒ Object
17 18 19 |
# File 'lib/prawn/svg/state.rb', line 17 def initialize_dup(_other) @computed_properties = @computed_properties.dup end |