コード例 #1
0
 def bound_box(self) -> BBox:
     """BBox: Returns the overall bounding box of this instance."""
     barr = BBoxArray(self._master.bound_box,
                      nx=self.nx,
                      ny=self.ny,
                      spx=self.spx,
                      spy=self.spy)
     return barr.transform(self.transformation).get_overall_bbox()
コード例 #2
0
    def fill_box(self) -> BBox:
        """Returns the fill box of this instance."""
        master_box = getattr(self._master, 'fill_box', None)  # type: BBox
        if master_box is None:
            raise ValueError('Master template fill box is not defined.')

        barr = BBoxArray(master_box,
                         nx=self.nx,
                         ny=self.ny,
                         spx=self.spx,
                         spy=self.spy)
        return barr.transform(self.transformation).get_overall_bbox()
コード例 #3
0
    def array_box(self) -> BBox:
        """Returns the array box of this instance."""
        master_box: BBox = getattr(self._master, 'array_box', None)
        if master_box is None:
            raise ValueError('Master template array box is not defined.')

        barr = BBoxArray(master_box,
                         nx=self.nx,
                         ny=self.ny,
                         spx=self.spx,
                         spy=self.spy)
        return barr.transform(self.transformation).bound_box