示例#1
0
文件: graphic.py 项目: xnoob/Inkcut
 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))
示例#2
0
 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))
示例#3
0
 def _update_bounding_box(self):
     path = cubicsuperpath.parsePath(simplepath.formatPath(self._data))
     bbox = list(simpletransform.roughBBox(path))
     self._properties['bounding_box'] = bbox
示例#4
0
文件: graphic.py 项目: xnoob/Inkcut
 def _update_bounding_box(self):
     path = cubicsuperpath.parsePath(simplepath.formatPath(self._data))
     bbox = list(simpletransform.roughBBox(path))
     self._properties['bounding_box'] = bbox