示例#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
 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
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)