Class: Prawn::SVG::State

Inherits:
Object
  • Object
show all
Defined in:
lib/prawn/svg/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeState

Returns a new instance of State.



8
9
10
11
12
13
# File 'lib/prawn/svg/state.rb', line 8

def initialize
  @stroke_width = 1
  @fill_opacity = 1
  @stroke_opacity = 1
  @computed_properties = Prawn::SVG::Properties.new.load_default_stylesheet
end

Instance Attribute Details

#computed_propertiesObject

Returns the value of attribute computed_properties.



2
3
4
# File 'lib/prawn/svg/state.rb', line 2

def computed_properties
  @computed_properties
end

#fill_opacityObject

Returns the value of attribute fill_opacity.



2
3
4
# File 'lib/prawn/svg/state.rb', line 2

def fill_opacity
  @fill_opacity
end

#inside_clip_pathObject

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_useObject

Returns the value of attribute inside_use.



2
3
4
# File 'lib/prawn/svg/state.rb', line 2

def inside_use
  @inside_use
end

#preserve_spaceObject

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_opacityObject

Returns the value of attribute stroke_opacity.



2
3
4
# File 'lib/prawn/svg/state.rb', line 2

def stroke_opacity
  @stroke_opacity
end

#stroke_widthObject

Returns the value of attribute stroke_width.



2
3
4
# File 'lib/prawn/svg/state.rb', line 2

def stroke_width
  @stroke_width
end

#textObject

Returns the value of attribute text.



2
3
4
# File 'lib/prawn/svg/state.rb', line 2

def text
  @text
end

#viewport_sizingObject

Returns the value of attribute viewport_sizing.



2
3
4
# File 'lib/prawn/svg/state.rb', line 2

def viewport_sizing
  @viewport_sizing
end

Instance Method Details

#disable_drawingObject



19
20
21
# File 'lib/prawn/svg/state.rb', line 19

def disable_drawing
  inside_clip_path
end

#initialize_dup(other) ⇒ Object



15
16
17
# File 'lib/prawn/svg/state.rb', line 15

def initialize_dup(other)
  @computed_properties = @computed_properties.dup
end