topfunky / gruff

Gruff graphing library for Ruby
http://gruff.rubyforge.org
MIT License
1.37k stars 237 forks source link

Fix error when input empty data in Gruff::Area #591

Closed Watson1978 closed 2 years ago

Watson1978 commented 2 years ago

This patch will fix following exception.

/home/watson/prj/gruff/lib/gruff/renderer/renderer.rb:19:in `draw': non-conforming drawing primitive definition `polygon' @ error/draw.c/RenderMVGContent/4489 (Magick::ImageMagickError)
        from /home/watson/prj/gruff/lib/gruff/renderer/renderer.rb:19:in `finish'
        from /home/watson/prj/gruff/lib/gruff/base.rb:498:in `to_image'
        from /home/watson/prj/gruff/lib/gruff/base.rb:479:in `write'
        from gruff.rb:41:in `block in <main>'
        from gruff.rb:13:in `each'
        from gruff.rb:13:in `<main>'