Sha256: 51d02f7cecedd843cd5f8edad25c95111bb0bba690b007fb1442c9b333884651
Contents?: true
Size: 723 Bytes
Versions: 6
Compression:
Stored size: 723 Bytes
Contents
#!/usr/bin/env ruby -w require 'rmagick' imgl = Magick::ImageList.new imgl.new_image(250, 250, Magick::HatchFill.new('white', 'LightCyan2')) gc = Magick::Draw.new # Draw the circle gc.fill_opacity(0) gc.stroke('red').stroke_width(3) gc.circle(125, 125, 25, 125) # Draw a little gray circle on the perimeter gc.stroke_width(1) gc.stroke('gray50') gc.circle(25, 125, 28, 128) # Draw a dot at the center gc.fill_opacity(1) gc.circle(125, 125, 128, 128) # Annotate the dots gc.font_weight(Magick::NormalWeight) gc.font_style(Magick::NormalStyle) gc.fill('black') gc.stroke('transparent') gc.text(132, 125, "'125,125'") gc.text(32, 125, "'25,125'") gc.draw(imgl) imgl.border!(1, 1, 'lightcyan2') imgl.write('circle.gif')
Version data entries
6 entries across 6 versions & 1 rubygems