예제 #1
0
 def insertBPoint(self,
                  index,
                  type=None,
                  anchor=None,
                  bcpIn=None,
                  bcpOut=None,
                  bPoint=None):
     """
     Insert a bPoint at index in the contour.
     """
     if bPoint is not None:
         if type is None:
             type = bPoint.type
         if anchor is None:
             anchor = bPoint.anchor
         if bcpIn is None:
             bcpIn = bPoint.bcpIn
         if bcpOut is None:
             bcpOut = bPoint.bcpOut
     index = normalizers.normalizeIndex(index)
     type = normalizers.normalizeBPointType(type)
     anchor = normalizers.normalizeCoordinateTuple(anchor)
     if bcpIn is None:
         bcpIn = (0, 0)
     bcpIn = normalizers.normalizeCoordinateTuple(bcpIn)
     if bcpOut is None:
         bcpOut = (0, 0)
     bcpOut = normalizers.normalizeCoordinateTuple(bcpOut)
     self._insertBPoint(index=index,
                        type=type,
                        anchor=anchor,
                        bcpIn=bcpIn,
                        bcpOut=bcpOut)
예제 #2
0
 def appendBPoint(self,
                  type=None,
                  anchor=None,
                  bcpIn=None,
                  bcpOut=None,
                  bPoint=None):
     """
     Append a bPoint to the contour.
     """
     if bPoint is not None:
         if type is None:
             type = bPoint.type
         if anchor is None:
             anchor = bPoint.anchor
         if bcpIn is None:
             bcpIn = bPoint.bcpIn
         if bcpOut is None:
             bcpOut = bPoint.bcpOut
     type = normalizers.normalizeBPointType(type)
     anchor = normalizers.normalizeCoordinateTuple(anchor)
     if bcpIn is None:
         bcpIn = (0, 0)
     bcpIn = normalizers.normalizeCoordinateTuple(bcpIn)
     if bcpOut is None:
         bcpOut = (0, 0)
     bcpOut = normalizers.normalizeCoordinateTuple(bcpOut)
     self._appendBPoint(type, anchor, bcpIn=bcpIn, bcpOut=bcpOut)
예제 #3
0
 def insertBPoint(self,
                  index,
                  type,
                  anchor,
                  bcpIn=None,
                  bcpOut=None,
                  **kwargs):
     """
     Insert a bPoint at index in the contour.
     """
     index = normalizers.normalizeIndex(index)
     type = normalizers.normalizeBPointType(type)
     anchor = normalizers.normalizeCoordinateTuple(anchor)
     if bcpIn is None:
         bcpIn = (0, 0)
     bcpIn = normalizers.normalizeCoordinateTuple(bcpIn)
     if bcpOut is None:
         bcpOut = (0, 0)
     bcpOut = normalizers.normalizeCoordinateTuple(bcpOut)
     self._insertBPoint(index=index,
                        type=type,
                        anchor=anchor,
                        bcpIn=bcpIn,
                        bcpOut=bcpOut,
                        **kwargs)
예제 #4
0
 def appendBPoint(self, type, anchor, bcpIn=None, bcpOut=None):
     """
     Append a bPoint to the contour.
     """
     type = normalizers.normalizeBPointType(type)
     anchor = normalizers.normalizeCoordinateTuple(anchor)
     if bcpIn is None:
         bcpIn = (0, 0)
     bcpIn = normalizers.normalizeCoordinateTuple(bcpIn)
     if bcpOut is None:
         bcpOut = (0, 0)
     bcpOut = normalizers.normalizeCoordinateTuple(bcpOut)
     self._appendBPoint(type, anchor, bcpIn=bcpIn, bcpOut=bcpOut)
예제 #5
0
파일: contour.py 프로젝트: moyogo/fontparts
 def appendBPoint(self, type=None, anchor=None, bcpIn=None, bcpOut=None, bPoint=None):
     """
     Append a bPoint to the contour.
     """
     if bPoint is not None:
         if type is None:
             type = bPoint.type
         if anchor is None:
             anchor = bPoint.anchor
         if bcpIn is None:
             bcpIn = bPoint.bcpIn
         if bcpOut is None:
             bcpOut = bPoint.bcpOut
     type = normalizers.normalizeBPointType(type)
     anchor = normalizers.normalizeCoordinateTuple(anchor)
     if bcpIn is None:
         bcpIn = (0, 0)
     bcpIn = normalizers.normalizeCoordinateTuple(bcpIn)
     if bcpOut is None:
         bcpOut = (0, 0)
     bcpOut = normalizers.normalizeCoordinateTuple(bcpOut)
     self._appendBPoint(type, anchor, bcpIn=bcpIn, bcpOut=bcpOut)
예제 #6
0
파일: contour.py 프로젝트: moyogo/fontparts
 def insertBPoint(self, index, type=None, anchor=None, bcpIn=None, bcpOut=None, bPoint=None):
     """
     Insert a bPoint at index in the contour.
     """
     if bPoint is not None:
         if type is None:
             type = bPoint.type
         if anchor is None:
             anchor = bPoint.anchor
         if bcpIn is None:
             bcpIn = bPoint.bcpIn
         if bcpOut is None:
             bcpOut = bPoint.bcpOut
     index = normalizers.normalizeIndex(index)
     type = normalizers.normalizeBPointType(type)
     anchor = normalizers.normalizeCoordinateTuple(anchor)
     if bcpIn is None:
         bcpIn = (0, 0)
     bcpIn = normalizers.normalizeCoordinateTuple(bcpIn)
     if bcpOut is None:
         bcpOut = (0, 0)
     bcpOut = normalizers.normalizeCoordinateTuple(bcpOut)
     self._insertBPoint(index=index, type=type, anchor=anchor,
                        bcpIn=bcpIn, bcpOut=bcpOut)
예제 #7
0
 def _set_base_type(self, value):
     value = normalizers.normalizeBPointType(value)
     self._set_type(value)
예제 #8
0
 def _get_base_type(self):
     value = self._get_type()
     value = normalizers.normalizeBPointType(value)
     return value
예제 #9
0
 def _set_base_type(self, value):
     value = normalizers.normalizeBPointType(value)
     self._set_type(value)
예제 #10
0
 def _get_base_type(self):
     value = self._get_type()
     value = normalizers.normalizeBPointType(value)
     return value