コード例 #1
0
ファイル: colormap.py プロジェクト: l5d1l5/uvcdat
 def __init__(self,
              parent,
              Cp_name=None,
              Cp_name_src='default',
              createCp=0):
     #                                                             #
     ###############################################################
     # Initialize the colormap class and its members               #
     #                                                             #
     # The getCpmember function retrieves the values of the        #
     # colormap members in the C structure and passes back the     #
     # appropriate Python Object.                                  #
     ###############################################################
     #                                                             #
     if (createCp == 0):
         if (Cp_name == None):
             raise ValueError, 'Must provide a colormap name.'
         else:
             _vcs_legacy.copyCp(Cp_name_src, Cp_name)
             self.__dict__['name'] = Cp_name
     else:
         self.__dict__['name'] = Cp_name_src
     self.__dict__['s_name'] = 'Cp'
     self.__dict__['parent'] = parent
     self.__dict__['index'] = RGB_Table(
         self, self.__dict__['name'])  # Create colormap dictionary
コード例 #2
0
ファイル: colormap.py プロジェクト: UNESCO-IHE/uvcdat
 def __init__(self, parent, Cp_name=None, Cp_name_src='default', createCp=0):
     #                                                             #
     ###############################################################
     # Initialize the colormap class and its members               #
     #                                                             #
     # The getCpmember function retrieves the values of the        #
     # colormap members in the C structure and passes back the     #
     # appropriate Python Object.                                  #
     ###############################################################
     #                                                             #
     if (createCp == 0):
        if (Cp_name == None):
           raise ValueError, 'Must provide a colormap name.'
        else:
           _vcs_legacy.copyCp(Cp_name_src, Cp_name)
           self.__dict__['name'] = Cp_name
     else:
           self.__dict__['name']=Cp_name_src
     self.__dict__['s_name']='Cp'
     self.__dict__['parent']=parent
     self.__dict__['index']=RGB_Table(self,self.__dict__['name']) # Create colormap dictionary
コード例 #3
0
ファイル: colormap.py プロジェクト: UNESCO-IHE/uvcdat
def copyCp(old_name, new_name):
     return _vcs_legacy.copyCp(old_name, new_name)
コード例 #4
0
ファイル: colormap.py プロジェクト: l5d1l5/uvcdat
def copyCp(old_name, new_name):
    return _vcs_legacy.copyCp(old_name, new_name)