Пример #1
0
 def getIdentifierForPoint(self, point):
     """
     Create a new, unique identifier for and assign it to the point.
     If the point already has an identifier, the existing one should be returned.
     """
     point = normalizers.normalizePoint(point)
     return self._getIdentifierforPoint(point)
Пример #2
0
 def _set_base_selectedPoints(self, value):
     normalized = []
     for i in value:
         if isinstance(i, int):
             i = normalizers.normalizePointIndex(i)
         else:
             i = normalizers.normalizePoint(i)
         normalized.append(i)
     self._set_selectedPoints(normalized)
Пример #3
0
 def _set_base_selectedPoints(self, value):
     normalized = []
     for i in value:
         if isinstance(i, int):
             i = normalizers.normalizePointIndex(i)
         else:
             i = normalizers.normalizePoint(i)
         normalized.append(i)
     self._set_selectedPoints(normalized)
Пример #4
0
    def getIdentifierForPoint(self, point):
        """
        Create a unique identifier for and assign it to ``point``.
        If the point already has an identifier, the existing
        identifier will be returned.

            >>> contour.getIdentifierForPoint(point)
            'ILHGJlygfds'

        ``point`` must be a :class:`BasePoint`. The returned value
        will be a :ref:`type-identifier`.
        """
        point = normalizers.normalizePoint(point)
        return self._getIdentifierforPoint(point)
Пример #5
0
    def getIdentifierForPoint(self, point):
        """
        Create a unique identifier for and assign it to ``point``.
        If the point already has an identifier, the existing
        identifier will be returned.

            >>> contour.getIdentifierForPoint(point)
            'ILHGJlygfds'

        ``point`` must be a :class:`BasePoint`. The returned value
        will be a :ref:`type-identifier`.
        """
        point = normalizers.normalizePoint(point)
        return self._getIdentifierforPoint(point)
Пример #6
0
 def _get_base_selectedPoints(self):
     selected = tuple([normalizers.normalizePoint(point)
                      for point in self._get_selectedPoints()])
     return selected
Пример #7
0
 def _get_base_selectedPoints(self):
     selected = tuple([normalizers.normalizePoint(point)
                      for point in self._get_selectedPoints()])
     return selected