Sha256: 18dc7c7e966f4da20f36d250bff3ac5984aa3c717229229515cd82395019c9d7

Contents?: true

Size: 1.04 KB

Versions: 59

Compression:

Stored size: 1.04 KB

Contents

require 'rvg/rvg'

Magick::RVG.dpi = 90

rvg = Magick::RVG.new(12.cm, 5.25.cm).viewbox(0, 0, 1200, 400) do |canvas|
    canvas.title = "Example arcs01 - arc commands in path data"
    canvas.desc = <<-END_DESC
        Picture of a pie chart with two pie wedges and a picture
        of a line with arc blips
    END_DESC
    canvas.background_fill = 'white'
    canvas.rect(1196, 395, 1, 1).styles(:fill=>'none', :stroke=>'blue', :stroke_width=>1)

    canvas.path("M300,200 h-150 a150,150 0 1,0 150,-150 z").
                styles(:fill=>'red', :stroke=>'blue', :stroke_width=>5)
    canvas.path("M275,175 v-150 a150,150 0 0,0 -150,150 z").
                styles(:fill=>'yellow', :stroke=>'blue', :stroke_width=>5)
    canvas.path(<<-END_PATH
           M600,350 l 50,-25
           a25,25 -30 0,1 50,-25 l 50,-25
           a25,50 -30 0,1 50,-25 l 50,-25
           a25,75 -30 0,1 50,-25 l 50,-25
           a25,100 -30 0,1 50,-25 l 50,-25
           END_PATH
           ).styles(:fill=>'none', :stroke=>'red', :stroke_width=>5)
end

rvg.draw.write('arcs01.gif')

Version data entries

59 entries across 59 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/arcs01.rb
rmagick-2.13.3 doc/ex/arcs01.rb
rmagick-2.13.3.rc1 doc/ex/arcs01.rb
rmagick-2.13.2 doc/ex/arcs01.rb
rdp-rmagick-0.0.0 doc/ex/arcs01.rb
rmagick-2.13.1 doc/ex/arcs01.rb
rmagick-2.12.2 doc/ex/arcs01.rb
rmagick-2.12.1 doc/ex/arcs01.rb
rmagick-2.12.0 doc/ex/arcs01.rb
rmagick-2.11.1 doc/ex/arcs01.rb
rmagick-2.10.0 doc/ex/arcs01.rb
rmagick-2.11.0 doc/ex/arcs01.rb
rmagick-1.10.1 doc/ex/arcs01.rb
rmagick-1.10.0 doc/ex/arcs01.rb
rmagick-1.11.1 doc/ex/arcs01.rb
rmagick-1.11.0 doc/ex/arcs01.rb
rmagick-1.13.0 doc/ex/arcs01.rb
rmagick-1.12.0 doc/ex/arcs01.rb
rmagick-1.15.10 doc/ex/arcs01.rb
rmagick-1.15.0 doc/ex/arcs01.rb