Exemplo n.º 1
0
 def __init__(self, trafo = None, radius1 = 0, radius2 = 0,
              properties = None, duplicate = None):
     RectangularPrimitive.__init__(self, trafo, properties = properties,
                                   duplicate = duplicate)
     if duplicate is not None:
         self.radius1 = duplicate.radius1
         self.radius2 = duplicate.radius2
     else:
         self.radius1 = radius1
         self.radius2 = radius2
Exemplo n.º 2
0
	def __init__(self, trafo = None, radius1 = 0, radius2 = 0,
					properties = None, duplicate = None):
		RectangularPrimitive.__init__(self, trafo, properties = properties,
										duplicate = duplicate)
		if duplicate is not None:
			self.radius1 = duplicate.radius1
			self.radius2 = duplicate.radius2
		else:
			self.radius1 = radius1
			self.radius2 = radius2
	def __init__(self, trafo = None, radius1 = 0, radius2 = 0,
					properties = None, duplicate = None):
		if trafo is not None and trafo.m11==trafo.m21==trafo.m12==trafo.m22==0:
			trafo=Trafo(1,0,0,-1,trafo.v1,trafo.v2)
		RectangularPrimitive.__init__(self, trafo, properties = properties,
										duplicate = duplicate)	
		if duplicate is not None:
			self.radius1 = duplicate.radius1
			self.radius2 = duplicate.radius2
		else:
			self.radius1 = radius1
			self.radius2 = radius2
Exemplo n.º 4
0
    def __init__(self, trafo = None, start_angle = 0.0, end_angle = 0.0,
		 arc_type = ArcPieSlice, properties = None, duplicate = None):
	if duplicate is not None:
	    self.start_angle = duplicate.start_angle
	    self.end_angle = duplicate.end_angle
	    self.arc_type = duplicate.arc_type
	else:
	    self.start_angle = start_angle
	    self.end_angle = end_angle
	    self.arc_type = arc_type
	RectangularPrimitive.__init__(self, trafo, properties = properties,
				      duplicate = duplicate)
	self.normalize()
Exemplo n.º 5
0
 def __init__(self, trafo = None, start_angle = 0.0, end_angle = 0.0,
              arc_type = ArcPieSlice, properties = None, duplicate = None):
     if duplicate is not None:
         self.start_angle = duplicate.start_angle
         self.end_angle = duplicate.end_angle
         self.arc_type = duplicate.arc_type
     else:
         self.start_angle = start_angle
         self.end_angle = end_angle
         self.arc_type = arc_type
     RectangularPrimitive.__init__(self, trafo, properties = properties,
                                   duplicate = duplicate)
     self.normalize()
Exemplo n.º 6
0
    def __init__(self, trafo = None, text = '', halign = ALIGN_LEFT,
                 valign = ALIGN_BASE, properties = None, duplicate = None):
	CommonText.__init__(self, text, duplicate)
	RectangularPrimitive.__init__(self, trafo, properties = properties,
				      duplicate = duplicate)
	if duplicate != None:
	    self.halign = duplicate.halign
	    self.valign = duplicate.valign
	    self.atrafo = duplicate.atrafo
	else:
	    self.halign = halign
	    self.valign = valign
	    if properties is None:
                self.properties = PropertyStack(base=FactoryTextStyle())
	self.cache = {}
Exemplo n.º 7
0
 def __init__(
     self, trafo=None, start_angle=0.0, end_angle=0.0, arc_type=ArcPieSlice, properties=None, duplicate=None
 ):
     if trafo is not None and trafo.m11 == trafo.m21 == trafo.m12 == trafo.m22 == 0:
         trafo = Trafo(1, 0, 0, -1, trafo.v1, trafo.v2)
     if duplicate is not None:
         self.start_angle = duplicate.start_angle
         self.end_angle = duplicate.end_angle
         self.arc_type = duplicate.arc_type
     else:
         self.start_angle = start_angle
         self.end_angle = end_angle
         self.arc_type = arc_type
     RectangularPrimitive.__init__(self, trafo, properties=properties, duplicate=duplicate)
     self.normalize()
Exemplo n.º 8
0
	def __init__(self, trafo=None, text='', halign=const.ALIGN_LEFT,
					valign=const.ALIGN_BASE, properties=None, duplicate=None):
		CommonText.__init__(self, text, duplicate)
		RectangularPrimitive.__init__(self, trafo, properties=properties,
										duplicate=duplicate)
		if duplicate != None:
			self.halign = duplicate.halign
			self.valign = duplicate.valign
			self.atrafo = duplicate.atrafo
		else:
			self.halign = halign
			self.valign = valign
			if properties is None:
				self.properties = PropertyStack(base=FactoryTextStyle())
			self.properties.align = self.halign
			self.properties.valign = self.valign
		self.cache = {}
Exemplo n.º 9
0
 def __init__(self,
              trafo=None,
              start_angle=0.0,
              end_angle=0.0,
              arc_type=ArcPieSlice,
              properties=None,
              duplicate=None):
     if trafo is not None and trafo.m11 == trafo.m21 == trafo.m12 == trafo.m22 == 0:
         trafo = Trafo(1, 0, 0, -1, trafo.v1, trafo.v2)
     if duplicate is not None:
         self.start_angle = duplicate.start_angle
         self.end_angle = duplicate.end_angle
         self.arc_type = duplicate.arc_type
     else:
         self.start_angle = start_angle
         self.end_angle = end_angle
         self.arc_type = arc_type
     RectangularPrimitive.__init__(self,
                                   trafo,
                                   properties=properties,
                                   duplicate=duplicate)
     self.normalize()