lib/prawn/svg/document.rb in prawn-svg-0.12.0.2 vs lib/prawn/svg/document.rb in prawn-svg-0.12.0.3
- old
+ new
@@ -16,18 +16,19 @@
# The scaling factor, as determined by the :width or :height options.
attr_accessor :scale
attr_reader :root,
- :actual_width, :actual_height, :width, :height, :x_offset, :y_offset,
+ :actual_width, :actual_height, :width, :height, :x_offset, :y_offset, :cache_images,
:css_parser
def initialize(data, bounds, options)
@css_parser = CssParser::Parser.new if CSS_PARSER_LOADED
@root = REXML::Document.new(data).root
@warnings = []
@options = options
+ @cache_images = options[:cache_images]
@actual_width, @actual_height = bounds # set this first so % width/heights can be used
if vb = @root.attributes['viewBox']
x1, y1, x2, y2 = vb.strip.split(/\s+/)
@x_offset, @y_offset = [x1.to_f, y1.to_f]