Exemple #1
0
 def __init__(self, vertices=5, radius=50.0, trafo=None, loading=0, duplicate=None):
     TrafoPlugin.__init__(self, trafo=trafo, duplicate=duplicate)
     if duplicate is not None:
         self.vertices = duplicate.vertices
         self.radius = duplicate.radius
     else:
         self.vertices = vertices
         self.radius = radius
     if not loading:
         self.recompute()
Exemple #2
0
    def __init__(self, text = '0', size = 12.0, trafo = None, loading = 0,
		 duplicate = None):
	TrafoPlugin.__init__(self, trafo = trafo, duplicate = duplicate)
	if duplicate is not None:
	    self.text = duplicate.text
	    self.size = duplicate.size
	else:
	    self.text = text
	    self.size = size
	if not loading:
	    self.recompute()
Exemple #3
0
 def __init__(self, vertices = 5, radius = 50.0, trafo = None, loading = 0,
              duplicate = None):
     TrafoPlugin.__init__(self, trafo = trafo, duplicate = duplicate)
     if duplicate is not None:
         self.vertices = duplicate.vertices
         self.radius = duplicate.radius
     else:
         self.vertices = vertices
         self.radius = radius
     if not loading:
         self.recompute()
Exemple #4
0
 def __init__(self, text = '0', size = 12.0, trafo = None, loading = 0,
              duplicate = None):
     TrafoPlugin.__init__(self, trafo = trafo, duplicate = duplicate)
     if duplicate is not None:
         self.text = duplicate.text
         self.size = duplicate.size
     else:
         self.text = text
         self.size = size
     if not loading:
         self.recompute()
Exemple #5
0
    def __init__(self, data = None, trafo = None, version = None, \
                 duplicate = None, loading = 0):
        TrafoPlugin.__init__(self, trafo=trafo, duplicate=duplicate)

        self.editor = None

        if duplicate:
            data = duplicate.GetData()
            self.SetData(data)
            self.name = duplicate.name

        if loading:
            self.SetData(data, version)

        else:
            self.recompute()
Exemple #6
0
    def __init__(self, text = '', styling = [],
                 trafo = None, loading = 0, duplicate = None):
        self.objects = []
        TrafoPlugin.__init__(self, trafo = trafo, duplicate = duplicate)

        if duplicate is not None:
            self.text = duplicate.text
            self.styling = duplicate.styling[:]
        else:
            self.text = text
            if loading: # XXX a bit ugly 
                raw = styling
                styling = raw2styling(raw)
            self.styling = styling
        if not loading:
            self.recompute()
Exemple #7
0
    def __init__(self,
                 text='',
                 styling=[],
                 trafo=None,
                 loading=0,
                 duplicate=None):
        self.objects = []
        TrafoPlugin.__init__(self, trafo=trafo, duplicate=duplicate)

        if duplicate is not None:
            self.text = duplicate.text
            self.styling = duplicate.styling[:]
        else:
            self.text = text
            if loading:  # XXX a bit ugly
                raw = styling
                styling = raw2styling(raw)
            self.styling = styling
        if not loading:
            self.recompute()
Exemple #8
0
 def Properties(self):
     if self.objects:
         return self.objects[0].Properties()
     return TrafoPlugin.Properties(self)
Exemple #9
0
 def SaveToFile(self, file):
     data = self.GetData()
     TrafoPlugin.SaveToFile(self, file, self.name, data, self.trafo.coeff(),
                            VERSION)
Exemple #10
0
 def SaveToFile(self, file):
     TrafoPlugin.SaveToFile(self, file, self.vertices, self.radius,
                            self.trafo.coeff())
Exemple #11
0
 def SaveToFile(self, file):
     TrafoPlugin.SaveToFile(self, file, self.text, self.size,
                            self.trafo.coeff())
Exemple #12
0
 def SaveToFile(self, file):
     raw = styling2raw(self.styling)
     TrafoPlugin.SaveToFile(self, file, self.text, raw, self.trafo.coeff())
Exemple #13
0
 def SetParameters(self, params):
     return TrafoPlugin.SetParameters(self, params)