Added circle shape

This commit is contained in:
Andy Meneely
2014-07-29 14:58:22 -04:00
parent 77755cf150
commit e4d1900965
2 changed files with 39 additions and 1 deletions
+14 -1
View File
@@ -8,12 +8,25 @@ module Squib
cc = cairo_context
cc.rounded_rectangle(x, y, width, height, x_radius, y_radius)
cc.set_source_color(stroke_color)
cc.set_line_width(stroke_width);
cc.set_line_width(stroke_width)
cc.stroke
cc.rounded_rectangle(x, y, width, height, x_radius, y_radius)
cc.set_source_color(fill_color)
cc.fill
end
# :nodoc:
# @api private
def circle(x, y, radius, fill_color, stroke_color, stroke_width)
cc = cairo_context
cc.circle(x, y, radius)
cc.set_source_color(stroke_color)
cc.set_line_width(stroke_width)
cc.stroke
cc.circle(x, y, radius)
cc.set_source_color(fill_color)
cc.fill
end
end
end