75543eb22674b1dcc92f5734dcc6ea6366a929e3
3 def initialize(box_element
= nil)
5 read(box_element
) unless box_element
.nil?
10 self.id
= box_element
.attributes
["id"].to_i
11 self.name
= Label
.new box_element
.attributes
["name"]
12 self.mark
= box_element
.attributes
["mark"].to_f
14 self.x
= box_element
.elements
["location"].attributes
["x"].to_f
15 self.y
= box_element
.elements
["location"].attributes
["y"].to_f
16 self.width
= box_element
.elements
["size"].attributes
["width"].to_f
17 self.height
= box_element
.elements
["size"].attributes
["height"].to_f
18 self.comment
= box_element
.elements
["comment"].text
23 self.x
< other
.x
and self.x
+ self.width
> other
.x
+ other
.width
and
24 self.y
< other
.y
and self.y
+ self.height
> other
.y
+ other
.height