Exemplo n.º 1
0
 def Blend(self, other, p, q):
     blended = RectangularPrimitive.Blend(self, other, p, q)
     if self.start_angle != self.end_angle \
      or other.start_angle != other.end_angle:
         blended.start_angle = p * self.start_angle + q * other.start_angle
         blended.end_angle = p * self.end_angle + q * other.end_angle
         if self.start_angle == self.end_angle:
             blended.arc_type = other.arc_type
         elif other.start_angle == other.end_angle:
             blended.arc_type = self.arc_type
         else:
             if self.arc_type == other.arc_type:
                 blended.arc_type = self.arc_type
             # The rest of the arc type blends is quite arbitrary
             # XXX: are these rules acceptable? Maybe we should blend
             # the ellipses as bezier curves if the arc types differ
             elif self.arc_type == ArcArc or other.arc_type == ArcArc:
                 blended.arc_type = ArcArc
             elif self.arc_type == ArcChord or other.arc_type == ArcChord:
                 blended.arc_type = ArcChord
             else:
                 blended.arc_type = ArcPieSlice
     return blended
	def Blend(self, other, p, q):
		result = RectangularPrimitive.Blend(self, other, p, q)
		result.radius1 = p * self.radius1 + q * other.radius1
		result.radius2 = p * self.radius2 + q * other.radius2
		return result