Exemple #1
0
 def get_orthogonal(self, point):
   '''
   Return a unit vector orthogonal to self at point.
   
   Cases:
     zero members: default orthogonal
     one member: orthogonal to member
     many members: orthogonal to bounding box???
     
   Note the point is not necessarily outside the morph.
   '''
   if len(self) > 1:
     # print "Orthogonal of a composite morph is orthog to bounding box?????"
     '''
     It might be better to selectively hit only the frame primitive of some composites.
     But is the frame always drawn?
     To hitted member and let user slide between members?
     FIXME Aggregate the orthogonal of all members that intersect the point??
     '''
     # Note both bounds and point are in DCS
     return orthogonal.rect_orthogonal(self.bounds, point)
   elif len(self) == 1:
     return self[0].get_orthogonal(point)
   else:
     return vector.downward_vector() # upright
Exemple #2
0
 def get_orthogonal(self, point):
     '''
 Return a unit vector orthogonal to self at point.
 
 Cases:
   zero members: default orthogonal
   one member: orthogonal to member
   many members: orthogonal to bounding box???
   
 Note the point is not necessarily outside the morph.
 '''
     if len(self) > 1:
         # print "Orthogonal of a composite morph is orthog to bounding box?????"
         '''
   It might be better to selectively hit only the frame primitive of some composites.
   But is the frame always drawn?
   To hitted member and let user slide between members?
   FIXME Aggregate the orthogonal of all members that intersect the point??
   '''
         # Note both bounds and point are in DCS
         return orthogonal.rect_orthogonal(self.bounds, point)
     elif len(self) == 1:
         return self[0].get_orthogonal(point)
     else:
         return vector.downward_vector()  # upright
Exemple #3
0
 def get_orthogonal(self, point):
     # FIXME, should be the rotated glyph?
     return orthogonal.rect_orthogonal(self.bounds, point)
Exemple #4
0
 def get_orthogonal(self, point):
   ''' Orthogonal to TextEdit is orthogonal to frame '''
   return orthogonal.rect_orthogonal(self.bounds, point)