Sha256: 0b5f049bdea9d8257698fec373919c83a4b26e2908a3e57624514ea8674ab43f

Contents?: true

Size: 716 Bytes

Versions: 15

Compression:

Stored size: 716 Bytes

Contents

#! /usr/local/bin/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

15 entries across 15 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/circle.rb
rmagick-2.13.3 doc/ex/circle.rb
rmagick-2.13.3.rc1 doc/ex/circle.rb
rmagick-2.13.2 doc/ex/circle.rb
rdp-rmagick-0.0.0 doc/ex/circle.rb
rmagick-2.13.1 doc/ex/circle.rb
rmagick-2.12.2 doc/ex/circle.rb
rmagick-2.12.1 doc/ex/circle.rb
rmagick-2.12.0 doc/ex/circle.rb
rmagick-2.11.1 doc/ex/circle.rb
rmagick-2.10.0 doc/ex/circle.rb
rmagick-2.11.0 doc/ex/circle.rb
rmagick-2.9.0 doc/ex/circle.rb
rmagick-2.9.1 doc/ex/circle.rb
rmagick-2.9.2 doc/ex/circle.rb