lib/gruff/base.rb
# Return a rendered graph image.
# This can use RMagick's methods to adjust the image before saving.
#
# @return [Magick::Image] The rendered image.
#
# @example
#   g = Gruff::Line.new
#   g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88]
#   g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95]
#   image = g.to_image
#   image = image.resize(400, 300).quantize(128, Magick::RGBColorspace)
#   image.write('test.png')
#
Return a rendered graph image.
This can use RMagick's methods to adjust the image before saving.
Return a rendered graph image . This can use RMagick ' s methods to adjust the image before saving .
def to_image
      @to_image ||= begin
        draw
        renderer.finish
        renderer.image
      end
    end
def to_image @to_image ||= begin draw renderer . finish renderer . image end end
Return a rendered graph image.
Return a rendered graph image .
The rendered image.
The rendered image .
Magick::Image
example
None