Exemple #1
0
	def RemoveTransformation(self):
		if self.trafo.matrix() != IdentityMatrix:
			trafo = self.trafo
			try:
				undostyle = Primitive.Transform(self, trafo.inverse())
			except SingularMatrix:
				undostyle = None
			undotrafo = self.set_transformation(Translation(trafo.offset()))
			return CreateMultiUndo(undostyle, undotrafo)
		return NullUndo
 def RemoveTransformation(self):
     if self.trafo.matrix() != IdentityMatrix:
         a = self.properties
         trafo = self.trafo
         llx, lly, urx, ury = a.font.TextCoordBox(self.text, a.font_size, a)
         try:
             undostyle = Primitive.Transform(self, trafo.inverse())
         except SingularMatrix:
             undostyle = None
         undotrafo = self.set_transformation(Translation(trafo.offset()))
         return CreateMultiUndo(undostyle, undotrafo)
     return NullUndo