Initial implementation of curves

Contributes to #37
This commit is contained in:
Andy Meneely
2015-03-19 18:15:24 -04:00
parent 6f40e1db99
commit 2cc9cc8e93
8 changed files with 68 additions and 3 deletions
+11
View File
@@ -34,4 +34,15 @@ cairo: set_source_color([:black])
cairo: set_line_width([25.0])
cairo: stroke([])
cairo: restore([])
cairo: save([])
cairo: move_to([50, 850])
cairo: curve_to([150, 700, 150, 700, 625, 900])
cairo: set_line_width([12.0])
cairo: set_source_color([:cyan])
cairo: stroke([])
cairo: move_to([50, 850])
cairo: curve_to([150, 700, 150, 700, 625, 900])
cairo: set_source_color([:burgundy])
cairo: fill([])
cairo: restore([])
surface: write_to_png(["_output/shape_00.png"])
+1 -1
View File
@@ -84,7 +84,7 @@ def mock_cairo(strio)
update_pango_layout width height show_pango_layout rounded_rectangle
set_line_width stroke fill set_source scale render_rsvg_handle circle
triangle line_to operator= show_page clip transform mask rectangle
reset_clip antialias=).each do |m|
reset_clip antialias= curve_to).each do |m|
allow(cxt).to receive(m) { |*args| strio << scrub_hex("cairo: #{m}(#{args})\n") }
end