Adding circle and triangle, and example

Closes #7
This commit is contained in:
Andy Meneely
2014-07-29 16:10:49 -04:00
parent e4d1900965
commit 10b0e1811e
4 changed files with 60 additions and 0 deletions
+13
View File
@@ -27,6 +27,19 @@ module Squib
cc.set_source_color(fill_color)
cc.fill
end
# :nodoc:
# @api private
def triangle(x1, y1, x2, y2, x3, y3, fill_color, stroke_color, stroke_width)
cc = cairo_context
cc.triangle(x1, y1, x2, y2, x3, y3)
cc.set_source_color(stroke_color)
cc.set_line_width(stroke_width)
cc.stroke
cc.triangle(x1, y1, x2, y2, x3, y3)
cc.set_source_color(fill_color)
cc.fill
end
end
end