parameters: (self, win, sort = 10,
                       displayRegion = (0, 1, 0, 1), coords = (-1, 1, -1, 1),
                       lens = None, cameraName = None)
return_statement: return camera2d
docstring: Makes a new camera2d associated with the indicated window, and
          assigns it to render the indicated subrectangle of render2d.
  
          :rtype: panda3d.core.NodePath
docstring_summary: Makes a new camera2d associated with the indicated window, and
          assigns it to render the indicated subrectangle of render2d.
docstring_tokens: Makes a new camera2d associated with the indicated window and assigns it to render the indicated subrectangle of render2d .
function: def makeCamera2d(self, win, sort = 10,
                       displayRegion = (0, 1, 0, 1), coords = (-1, 1, -1, 1),
                       lens = None, cameraName = None):
          """
          Makes a new camera2d associated with the indicated window, and
          assigns it to render the indicated subrectangle of render2d.
  
          :rtype: panda3d.core.NodePath
          """
          dr = win.makeMonoDisplayRegion(*displayRegion)
          dr.setSort(sort)
  
          # Enable clearing of the depth buffer on this new display
          # region (see the comment in setupRender2d, above).
          dr.setClearDepthActive(1)
  
          # Make any texture reloads on the gui come up immediately.
          dr.setIncompleteRender(False)
  
          left, right, bottom, top = coords
  
          # Now make a new Camera node.
          if cameraName:
              cam2dNode = Camera('cam2d_' + cameraName)
          else:
              cam2dNode = Camera('cam2d')
  
          if lens is None:
              lens = OrthographicLens()
              lens.setFilmSize(right - left, top - bottom)
              lens.setFilmOffset((right + left) * 0.5, (top + bottom) * 0.5)
              lens.setNearFar(-1000, 1000)
          cam2dNode.setLens(lens)
  
          # self.camera2d is the analog of self.camera, although it's
          # not as clear how useful it is.
          if self.camera2d is None:
              self.camera2d = self.render2d.attachNewNode('camera2d')
  
          camera2d = self.camera2d.attachNewNode(cam2dNode)
          dr.setCamera(camera2d)
  
          if self.cam2d is None:
              self.cam2d = camera2d
  
          return camera2d
function_tokens: def makeCamera2d ( self , win , sort = 10 , displayRegion = ( 0 , 1 , 0 , 1 ) , coords = ( - 1 , 1 , - 1 , 1 ) , lens = None , cameraName = None ) : dr = win . makeMonoDisplayRegion ( * displayRegion ) dr . setSort ( sort ) # Enable clearing of the depth buffer on this new display # region (see the comment in setupRender2d, above). dr . setClearDepthActive ( 1 ) # Make any texture reloads on the gui come up immediately. dr . setIncompleteRender ( False ) left , right , bottom , top = coords # Now make a new Camera node. if cameraName : cam2dNode = Camera ( 'cam2d_' + cameraName ) else : cam2dNode = Camera ( 'cam2d' ) if lens is None : lens = OrthographicLens ( ) lens . setFilmSize ( right - left , top - bottom ) lens . setFilmOffset ( ( right + left ) * 0.5 , ( top + bottom ) * 0.5 ) lens . setNearFar ( - 1000 , 1000 ) cam2dNode . setLens ( lens ) # self.camera2d is the analog of self.camera, although it's # not as clear how useful it is. if self . camera2d is None : self . camera2d = self . render2d . attachNewNode ( 'camera2d' ) camera2d = self . camera2d . attachNewNode ( cam2dNode ) dr . setCamera ( camera2d ) if self . cam2d is None : self . cam2d = camera2d return camera2d