Commit 214a6e5

mo khan <mo@mokhan.ca>
2015-04-08 20:34:51
add a line.
1 parent 098a36a
Changed files (2)
lib
lib/scale/shapes/line.rb
@@ -0,0 +1,13 @@
+module Scale
+  class Line
+    include Node
+    attribute :x1, Integer # the x position of point 1
+    attribute :y1, Integer # the y position of point 1
+    attribute :x2, Integer # the x position of point 2
+    attribute :y2, Integer # the y position of point 2
+
+    def xml_tag
+      :circle
+    end
+  end
+end
lib/scale.rb
@@ -4,6 +4,7 @@ require "scale/svg"
 require "scale/shapes/rectangle"
 require "scale/shapes/circle"
 require "scale/shapes/ellipse"
+require "scale/shapes/line"
 require "scale/text"
 require "scale/dsl"