Sha256: ef367e01ddc6f154667db38c8894cbe835aef6b1c981f393560ddaeb4ca9adfd
Contents?: true
Size: 1 KB
Versions: 13
Compression:
Stored size: 1 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
13 entries across 13 versions & 3 rubygems