- if child.GetX() + w / 2>maxX:
- maxX = child.GetX() + w / 2
- if child.GetX()-w / 2<minX:
- minX = child.GetX()-w / 2
- if child.GetY() + h / 2>maxY:
- maxY = child.GetY() + h / 2
- if child.GetY()-h / 2<minY:
- minY = child.GetY()-h / 2
-
- self._width = maxX-minX
- self._height = maxY-minY
- self._xpos = self._width / 2 + minX
- self._ypos = self._height / 2 + minY
+ if child.GetX() + w / 2.0 > maxX:
+ maxX = child.GetX() + w / 2.0
+ if child.GetX() - w / 2.0 < minX:
+ minX = child.GetX() - w / 2.0
+ if child.GetY() + h / 2.0 > maxY:
+ maxY = child.GetY() + h / 2.0
+ if child.GetY() - h / 2.0 < minY:
+ minY = child.GetY() - h / 2.0
+
+ self._width = maxX - minX
+ self._height = maxY - minY
+ self._xpos = self._width / 2.0 + minX
+ self._ypos = self._height / 2.0 + minY