Sha256: 0cb0dc036e8171f2d4a387b940955eb0252f4dcd94ee73a8a4086d3fbe7be037

Contents?: true

Size: 391 Bytes

Versions: 2

Compression:

Stored size: 391 Bytes

Contents

require 'xrvg'

render = SVGRender[ :filename, "foreach.svg", :background, "white" ]
Circle[].samples(10).foreach do |p1,p2|
  render.add( Line[ :points, [p1,p2] ], Style[ :stroke, "black", :strokewidth, 0.1 ] )
  render.add( Circle[:center, p1, :radius, 0.1], Style[ :fill, Color.red ] )
  render.add( Circle[:center, p2, :radius, 0.2], Style[ :fill, Color.blue ] )
end
render.end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xrvg-0.0.2 examples/foreach.rb
xrvg-0.0.3 examples/foreach.rb