lib/squib/graphics/image.rb in squib-0.14.3.pre1 vs lib/squib/graphics/image.rb in squib-0.15.0
- old
+ new
@@ -79,15 +79,9 @@
# @api private
def svg(file, svg_args, box, paint, trans)
Squib.logger.debug {"Rendering: #{file}, id: #{id} @#{x},#{y} #{width}x#{height}, alpha: #{alpha}, blend: #{blend}, angle: #{angle}, mask: #{mask}"}
Squib.logger.warn 'Both an SVG file and SVG data were specified' unless file.to_s.empty? || svg_args.data.to_s.empty?
return if (file.nil? or file.eql? '') and svg_args.data.nil? # nothing specified TODO Move this out to arg validator
- if(box.width == 0 || box.height == 0)
- if @deck.conf.warn_zero_size_image?
- Squib.logger.warn "svg: zero-sized width or height detected for #{file}. SVG not drawn."
- end
- return
- end
svg_args.data = File.read(file) if svg_args.data.to_s.empty?
begin
svg = Rsvg::Handle.new_from_data(svg_args.data)
rescue Rsvg::Error::Failed
Squib.logger.error "Invalid SVG data. Is '#{file}' a valid svg file?"