- bottom_r = bottom_r[0] + .3, bottom_r[1] - .3
- self._set(top_l, bottom_r, y)
+ icorner = item.get_corner()
+ icorner = P3dGfxMgr.screen_coord(icorner)
+ if icorner[0] > corner[0]:
+ corner = icorner[0], corner[1]
+ if icorner[1] < corner[1]:
+ corner = corner[0], icorner[1]
+ self._set((pos[0], pos[2]), y)
+ bounds = self._np.get_tight_bounds()
+ corner3d = bounds[1][0], bounds[1][1], bounds[0][2]
+ corner2d = P3dGfxMgr.screen_coord(corner3d)
+ def __update(dscale):
+ scale = self._np.get_scale()
+ self._np.set_scale(scale + dscale)
+ bounds = self._np.get_tight_bounds()
+ corner3d = bounds[1][0], bounds[1][1], bounds[0][2]
+ return P3dGfxMgr.screen_coord(corner3d)
+ while corner2d[0] < corner[0] + .01:
+ corner2d = __update((.01, 0, 0))
+ while corner2d[1] > corner[1] - .01:
+ corner2d = __update((0, 0, .01))