def DrawShape(self, device, rect=None, clip=0):
     RectangularPrimitive.DrawShape(self, device)
     base_trafo = self.trafo(self.atrafo)
     base_trafo = base_trafo(Scale(self.properties.font_size))
     paths = self.properties.font.GetPaths(self.text, self.properties)
     obj = PolyBezier(paths, self.properties.Duplicate())
     obj.Transform(base_trafo)
     device.MultiBezier(obj.paths, rect, clip)
Пример #2
0
 def DrawShape(self, device, rect=None, clip=0):
     #for b in self.AsBezier().GetObjects():
     #    b.DrawShape(device,rect,clip)
     #return
     RectangularPrimitive.DrawShape(self, device)
     # Workaround for a bug in my Xserver.
     #text = split(self.text, '\n')[0]
     device.DrawText(self.text,
                     self.trafo(self.atrafo),
                     clip,
                     cache=self.cache)
Пример #3
0
	def DrawShape(self, device, rect=None, clip=0):
		RectangularPrimitive.DrawShape(self, device)
		base_trafo = self.trafo(self.atrafo)
		if self.curves_cache is None:
			a = self.properties
			paths = a.font.get_paths(self.text, a)
			self.curves_cache = self.convert_paths(paths)
		paths = self.duplicate_paths(self.curves_cache)
		obj = PolyBezier(paths, self.properties.Duplicate())
		obj.Transform(base_trafo)
		device.MultiBezier(obj.paths, rect, clip)