DannyBen/victor

View on GitHub
examples/05_path_as_array.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'victor'

svg = Victor::SVG.new width: 200, height: 200

svg.build do
  rect x: 0, y: 0, width: 200, height: 200, fill: '#ddd'

  path d: ['M', 100, 90, 'q',  180, -140, 0, 70], fill: 'red'
  path d: ['M', 100, 90, 'q', -180, -140, 0, 70], fill: 'red'
end

svg.save '05_path_as_array'