コード例 #1
0
 def getSelection(self, notification=None):
     glyph = CurrentGlyph()
     if len(glyph.selection) == 0:
         return []
     elif len(glyph.selection) > 0:
         iG = IntelGlyph(glyph)
         if self.currentMode == 'Build':
             selection = iG.getSelection(True)
         elif self.currentMode in ['Break', 'Pit']:
             selection = [point for point in iG.getSelection() if (point.segmentType is not None) and (abs(point.turn()) > pi/18)]
         return selection
コード例 #2
0
 def getSelection(self, notification=None):
     glyph = CurrentGlyph()
     if len(glyph.selection) == 0:
         return []
     elif len(glyph.selection) > 0:
         iG = IntelGlyph(glyph)
         if self.currentMode == 'Build':
             selection = iG.getSelection(True)
         elif self.currentMode in ['Break', 'Pit']:
             selection = [point for point in iG.getSelection() if (point.segmentType is not None) and (abs(point.turn()) > pi/18)]
         return selection