Sha256: 27e39e063f926e25645d657dc6b59c23a0cf4f1f31ecee2844e31516b367a10b

Contents?: true

Size: 542 Bytes

Versions: 10

Compression:

Stored size: 542 Bytes

Contents

class Prawn::SVG::Elements::Root < Prawn::SVG::Elements::Base
  def initialize(document, source = document.root, parent_calls = [], state = ::Prawn::SVG::State.new)
    super
  end

  def parse
    state.viewport_sizing = @document.sizing
  end

  def apply
    add_call 'fill_color', '000000'
    add_call 'transformation_matrix', @document.sizing.x_scale, 0, 0, @document.sizing.y_scale, 0, 0
    add_call 'transformation_matrix', 1, 0, 0, 1, -@document.sizing.x_offset, @document.sizing.y_offset
  end

  def container?
    true
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
prawn-svg-0.30.0 lib/prawn/svg/elements/root.rb
prawn-svg-0.29.1 lib/prawn/svg/elements/root.rb
prawn-svg-0.29.0 lib/prawn/svg/elements/root.rb
prawn-svg-0.28.0 lib/prawn/svg/elements/root.rb
prawn-svg-0.27.1 lib/prawn/svg/elements/root.rb
prawn-svg-0.27.0 lib/prawn/svg/elements/root.rb
prawn-svg-0.26.0 lib/prawn/svg/elements/root.rb
prawn-svg-0.25.2 lib/prawn/svg/elements/root.rb
prawn-svg-0.25.1 lib/prawn/svg/elements/root.rb
prawn-svg-0.25.0 lib/prawn/svg/elements/root.rb