def __pressedAngleDetectionButton(self, widget): image = graphics.convertPixbufToImage(self.box_editor.getImage()) angle = graphics.getHorizontalAngleForText(image) debug('ANGLE: ', angle) self.box_editor.setAngle(angle)