class Quad
quad.rb
Attributes
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
x1,y1 == top left x2,y2 == top right x3,y3 == bottom left x4,y4 == bottom right
Public Class Methods
# File lib/r2d/quad.rb, line 14 def initialize(x1, y1, x2, y2, x3, y3, x4, y4, c="white", visible=true) @x1, @y1, @x2, @y2, @x3, @y3, @x4, @y4 = x1, y1, x2, y2, x3, y3, x4, y4 @color = c update_color(c) if visible then add end end
Public Instance Methods
# File lib/r2d/quad.rb, line 26 def add R2D::Window.add(self) end
# File lib/r2d/quad.rb, line 21 def color=(c) @color = c update_color(c) end
# File lib/r2d/quad.rb, line 30 def remove R2D::Window.remove(self) end
Private Instance Methods
# File lib/r2d/quad.rb, line 36 def update_color(c) @c1 = R2D::Color.new(c) @c2 = R2D::Color.new(c) @c3 = R2D::Color.new(c) @c4 = R2D::Color.new(c) end