def calculateBoundingBox(self): min_x = self.center_pos.x-self.radius min_y = self.center_pos.y-self.radius max_x = self.center_pos.x+self.radius max_y = self.center_pos.y+self.radius return Node.calculateBoundingBox({'min': ParseXY(min_x, min_y), 'max': ParseXY(max_x, max_y)})
def calculateBoundingBox(self): # TODO: finish implementation min_x = min(self.start_pos.x, self._calulateEndPos().x) min_y = min(self.start_pos.x, self._calulateEndPos().y) max_x = max(self.start_pos.x, self._calulateEndPos().x) max_y = max(self.start_pos.x, self._calulateEndPos().y) ''' for angle in range(4): float_angle = angle * math.pi/2. start_angle = _calculateStartAngle(self) end_angle = start_angle + math.radians(self.angle) # TODO: +- pi border if float_angle < start_angle: continue if float_angle > end_angle: continue print("TODO: add angle side: {1}".format(float_angle)) ''' return Node.calculateBoundingBox({ 'min': Point((min_x, min_y)), 'max': Point((max_x, max_y)) })
def calculateBoundingBox(self): render_start_pos = self.getRealPosition(self.start_pos) render_end_pos = self.getRealPosition(self.end_pos) min_x = min([render_start_pos.x, render_end_pos.x]) min_y = min([render_start_pos.y, render_end_pos.y]) max_x = max([render_start_pos.x, render_end_pos.x]) max_y = max([render_start_pos.y, render_end_pos.y]) return Node.calculateBoundingBox({'min': Vector2D(min_x, min_y), 'max': Vector2D(max_x, max_y)})
def calculateBoundingBox(self): width = len(self.text)*self.size['x'] height = self.size['y'] min_x = self.at[x]-width/2. min_y = self.at[y]-height/2. max_x = self.at[x]+width/2. max_y = self.at[y]+height/2. return Node.calculateBoundingBox({'min': Point(min_x, min_y), 'max': Point(max_x, max_y)})
def calculateBoundingBox(self): min = max = self.getRealPosition(self.nodes[0]) for n in self.nodes: min.x = min([min.x, n.x]) min.y = min([min.y, n.y]) max.x = max([max.x, n.x]) max.y = max([max.y, n.y]) return Node.calculateBoundingBox({'min': min, 'max': max})
def calculateBoundingBox(self): width = len(self.text)*self.size['x'] height = self.size['y'] min_x = self.at['x']-width/2. min_y = self.at['y']-height/2. max_x = self.at['x']+width/2. max_y = self.at['y']+height/2. return Node.calculateBoundingBox({'min': Vector2D(min_x, min_y), 'max': Vector2D(max_x, max_y)})
def calculateBoundingBox(self): render_start_pos = self.getRealPosition(self.start_pos) render_end_pos = self.getRealPosition(self.end_pos) min_x = min([render_start_pos.x, render_end_pos.x]) min_y = min([render_start_pos.y, render_end_pos.y]) max_x = max([render_start_pos.x, render_end_pos.x]) max_y = max([render_start_pos.y, render_end_pos.y]) return Node.calculateBoundingBox({"min": Point(min_x, min_y), "max": Point(max_x, max_y)})
def calculateBoundingBox(self): # TODO: finish implementation min_x = min(self.start_pos.x, self._calulateEndPos().x) min_y = min(self.start_pos.x, self._calulateEndPos().y) max_x = max(self.start_pos.x, self._calulateEndPos().x) max_y = max(self.start_pos.x, self._calulateEndPos().y) ''' for angle in range(4): float_angle = angle * math.pi/2. start_angle = _calculateStartAngle(self) end_angle = start_angle + math.radians(self.angle) # TODO: +- pi border if float_angle < start_angle: continue if float_angle > end_angle: continue print("TODO: add angle side: {1}".format(float_angle)) ''' return Node.calculateBoundingBox({'min': Point((min_x, min_y)), 'max': Point((max_x, max_y))})
def calculateBoundingBox(self): return Node.calculateBoundingBox(self)