lib/squib/graphics/shapes.rb in squib-0.0.4 vs lib/squib/graphics/shapes.rb in squib-0.0.5
- old
+ new
@@ -1,12 +1,13 @@
module Squib
class Card
-
+
# :nodoc:
- # @api private
+ # @api private
def rect(x, y, width, height, x_radius, y_radius, fill_color, stroke_color, stroke_width)
- width=@width if width==:native; height=@height if height==:native
+ width = @width if width == :native
+ height = @height if height == :native
use_cairo do |cc|
cc.rounded_rectangle(x, y, width, height, x_radius, y_radius)
cc.set_source_color(stroke_color)
cc.set_line_width(stroke_width)
cc.stroke
@@ -15,11 +16,11 @@
cc.fill
end
end
# :nodoc:
- # @api private
+ # @api private
def circle(x, y, radius, fill_color, stroke_color, stroke_width)
use_cairo do |cc|
cc.circle(x, y, radius)
cc.set_source_color(stroke_color)
cc.set_line_width(stroke_width)
@@ -29,11 +30,11 @@
cc.fill
end
end
# :nodoc:
- # @api private
+ # @api private
def triangle(x1, y1, x2, y2, x3, y3, fill_color, stroke_color, stroke_width)
use_cairo do |cc|
cc.triangle(x1, y1, x2, y2, x3, y3)
cc.set_source_color(stroke_color)
cc.set_line_width(stroke_width)
@@ -43,18 +44,18 @@
cc.fill
end
end
# :nodoc:
- # @api private
+ # @api private
def line(x1, y1, x2, y2, stroke_color, stroke_width)
use_cairo do |cc|
cc.move_to(x1, y1)
cc.line_to(x2, y2)
cc.set_source_color(stroke_color)
cc.set_line_width(stroke_width)
cc.stroke
end
end
-
+
end
-end
\ No newline at end of file
+end