def get_bounding_box(self, adjusted=False): """ Returns the bounding box, or corner points of the graphic as a list in the format [minx,maxx,miny,maxy]. If adjusted is true, the bounding box is adjusted to not include the weedline padding. """ had_weedline = self.get_weedline_status() if adjusted: self.set_weedline(False) # removes weedline if it is enabled path = cubicsuperpath.parsePath(simplepath.formatPath(self._data)) self.set_weedline(had_weedline) # adds weedline back if it was enabled return list(simpletransform.roughBBox(path))
def get_bounding_box(self,adjusted=False): """ Returns the bounding box, or corner points of the graphic as a list in the format [minx,maxx,miny,maxy]. If adjusted is true, the bounding box is adjusted to not include the weedline padding. """ had_weedline = self.get_weedline_status() if adjusted: self.set_weedline(False) # removes weedline if it is enabled path = cubicsuperpath.parsePath(simplepath.formatPath(self._data)) self.set_weedline(had_weedline) # adds weedline back if it was enabled return list(simpletransform.roughBBox(path))
def _update_bounding_box(self): path = cubicsuperpath.parsePath(simplepath.formatPath(self._data)) bbox = list(simpletransform.roughBBox(path)) self._properties['bounding_box'] = bbox