Module: Goo::CanvasItem

Defined in:
lib/goocanvas.rb

Instance Method Summary collapse

Instance Method Details

#boundsObject



62
63
64
# File 'lib/goocanvas.rb', line 62

def bounds
  [x1, x2, y1, y2]
end

#heightObject



70
71
72
# File 'lib/goocanvas.rb', line 70

def height
  y2 - y1
end

#set_child_properties(child, *args) ⇒ Object



57
58
59
60
# File 'lib/goocanvas.rb', line 57

def set_child_properties(child, *args)
  hash = Goo.args_to_hash(args)
  hash.each_pair { |key, value| set_child_property(child, key, value) }
end

#widthObject



66
67
68
# File 'lib/goocanvas.rb', line 66

def width
  x2 - x1
end

#xObject



74
75
76
# File 'lib/goocanvas.rb', line 74

def x
  x1
end

#yObject



78
79
80
# File 'lib/goocanvas.rb', line 78

def y
  y1
end