def resize(self):
        ok = True
        if self._width is None:
            w = self.width_spec.calculate()
            # if we calculated the value write it through the property so
            # that subclasses may react to the altered dimension
            if w is None: ok = False
            else: self.width = w
        if self._height is None:
            h = self.height_spec.calculate()
            if h is None: ok = False
            else: self.height = h
        return ok
Determine position and dimension.
dataset/ETHPy150Open ardekantur/pyglet/contrib/wydget/wydget/element.py/Element.resize