def get_bounds(self): minpos = self.meshctxt.size() maxpos = primitives.origin() dims = range(config.dimension()) for e in self._elements_from_aggregate(): for pos in e.cornernodePositions(): for i in dims: minpos[i] = min(minpos[i], pos[i]) maxpos[i] = max(maxpos[i], pos[i]) return primitives.rectangleFactory(minpos, maxpos)
def get_bounds(self): if self.group == placeholder.selection: if not self.ms.pixelselection.empty(): pmin, pmax = self.ms.pixelselection.getBounds() else: pmin = pmax = primitives.iOrigin() elif self.group == placeholder.every: pmin = primitives.iOrigin() pmax = self.ms.sizeInPixels() else: group = self.ms.findGroup(self.group) if group: pmin, pmax = group.getBounds() else: pmin = pmax = primitives.iOrigin() return primitives.rectangleFactory(pmin, pmax)
def get_bounds(self): return primitives.rectangleFactory(primitives.origin(), self.ms.size())