Browse Source

more tests for circle arc

Also document it in the CHANGELOG.
dev
Andy Meneely 9 years ago
parent
commit
a55300f844
  1. 7
      CHANGELOG.md
  2. 6
      samples/shapes/_draw_shapes.rb
  3. BIN
      samples/shapes/shape_00_expected.png
  4. 13
      spec/data/samples/shapes/_draw_shapes.rb.txt

7
CHANGELOG.md

@ -1,6 +1,13 @@
# Squib CHANGELOG
Squib follows [semantic versioning](http://semver.org).
## v0.14.0 / Unreleased
Features:
* `circle` method now supports various `arc` options, so you can draw partial circles (#211) by @sparr
Special thanks to @sparr for all of his work!!
## v0.13.2 / 2017-01-27
Bugs:

6
samples/shapes/_draw_shapes.rb

@ -18,7 +18,11 @@ Squib::Deck.new do
ellipse x: 675, y: 105, width: 65, height: 100,
stroke_width: 5, stroke_color: :orange, angle: -0.2
circle x: 600, y: 600, radius: 75,
circle x: 450, y: 600, radius: 75,
fill_color: :gray, stroke_color: :green, stroke_width: 8.0
circle x: 600, y: 600, radius: 75, # partial circle
arc_start: 1, arc_end: 4, arc_direction: :counter_clockwise,
fill_color: :gray, stroke_color: :green, stroke_width: 8.0
triangle x1: 50, y1: 50,

BIN
samples/shapes/shape_00_expected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 50 KiB

13
spec/data/samples/shapes/_draw_shapes.rb.txt

@ -618,7 +618,18 @@ cairo: set_dash([[]])
cairo: stroke([])
cairo: restore([])
cairo: save([])
cairo: arc([600, 600, 75, 0, 6.283185307179586])
cairo: arc([450, 600, 75, 0, 6.283185307179586])
cairo: set_source_color(["gray"])
cairo: fill_preserve([])
cairo: set_source_color(["green"])
cairo: set_line_width([8.0])
cairo: set_line_join([0])
cairo: set_line_cap([0])
cairo: set_dash([[]])
cairo: stroke([])
cairo: restore([])
cairo: save([])
cairo: arc_negative([600, 600, 75, 1, 4])
cairo: set_source_color(["gray"])
cairo: fill_preserve([])
cairo: set_source_color(["green"])

Loading…
Cancel
Save