summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTom Black <[email protected]>2017-05-19 17:16:17 -0400
committerTom Black <[email protected]>2017-05-19 17:16:17 -0400
commit8ce4acf745b27c3f1209b02cc6aeec2c40b5aa1b (patch)
treef28dc810ca89ae0fe3e4131580594ee660f0aca7
parent84f53ee75d2e759c60ab9e78152b464873cd25ce (diff)
downloadruby2d-8ce4acf745b27c3f1209b02cc6aeec2c40b5aa1b.tar.gz
ruby2d-8ce4acf745b27c3f1209b02cc6aeec2c40b5aa1b.zip
Add z-index to `Line` class
-rw-r--r--lib/ruby2d/line.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ruby2d/line.rb b/lib/ruby2d/line.rb
index 5053854..4832379 100644
--- a/lib/ruby2d/line.rb
+++ b/lib/ruby2d/line.rb
@@ -5,10 +5,11 @@ module Ruby2D
include Renderable
attr_accessor :x1, :x2, :y1, :y2, :color, :width
- def initialize(x1, y1, x2, y2, width=2, c='white')
+ def initialize(x1, y1, x2, y2, width=2, c='white', z=0)
@type_id = 3
@x1, @y1, @x2, @y2 = x1, y1, x2, y2
@width = width
+ @z = z
self.color = c
add
end