Added circle shape
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user