Esempio n. 1
0
	def CreateBrushIndirect(self):
		style, r, g, b, hatch = self.get_struct('<hBBBxh')
		if style == 1:
			pattern = EmptyPattern
		else:
			pattern = SolidPattern(CreateRGBColor(r / 255.0, g / 255.0, b / 255.0))
		self.add_gdiobject((('fill_pattern', pattern),))

		self._print('->', style, r, g, b, hatch)
Esempio n. 2
0
	def CreatePenIndirect(self):
		style, widthx, widthy, r, g, b = self.get_struct('<hhhBBBx')
		cap = (style & 0x0F00) >> 8
		join = (style & 0x00F0) >> 4
		style = style & 0x000F
		if style == 5:
			pattern = EmptyPattern
		else:
			pattern = SolidPattern(CreateRGBColor(r / 255.0, g / 255.0, b / 255.0))
		width = abs(widthx * self.trafo.m11)
		self.add_gdiobject((('line_pattern', pattern,),
							('line_width', width)))
		self._print('->', style, widthx, widthy, r, g, b, cap, join)
Esempio n. 3
0
 def lp(self, color=None):
     if color is None:
         self.style_obj.line_pattern = self.pattern
     else:
         self.style_obj.line_pattern = SolidPattern(color)
Esempio n. 4
0
 def fp(self, color=None):
     if color is None:
         self.style_obj.fill_pattern = self.pattern
     else:
         self.style_obj.fill_pattern = SolidPattern(color)
Esempio n. 5
0
 def ps(self, color):
     self.pattern = SolidPattern(color)
Esempio n. 6
0
	def DibCreatePatternBrush(self):
		self.add_message(_("Bitmap brushes not yet implemented. Using black"))
		pattern = SolidPattern(StandardColors.black)
		self.add_gdiobject((('fill_pattern', pattern),))