peng3d/gui/layered.py
def redraw_label(self):
        """
        Re-draws the text by calculating its position.
        
        Currently, the text will always be centered on the position of the layer.
        """
        # Convenience variables
        x,y,_,_ = self.getPos()
        sx,sy = self.getSize()
        
        self._label.x = x+sx/2.
        self._label.y = y+sy/2.
        self._label.width = sx
        # Height is not set, would look weird otherwise
        #self._label.height = sx
        self._label._update()
def redraw_label(self):
        """
        Re-draws the text by calculating its position.
        
        Currently, the text will always be centered on the position of the layer.
        """
        # Convenience variables
        x,y,_,_ = self.getPos()
        sx,sy = self.getSize()
        
        self._label.x = x+sx/2.
        self._label.y = y+sy/2.
        self._label.width = sx
        # Height is not set, would look weird otherwise
        #self._label.height = sx
        self._label._update()
Re-draws the text by calculating its position.
        
        Currently, the text will always be centered on the position of the layer.