def setfillstyle(self): style = basestyle.Duplicate() if reff.fill.type == 1: style.fill_pattern = SolidPattern(apply(CreateRGBColor , reff.fill.color)) elif reff.fill.type == 3: style.fill_pattern = HatchingPattern(apply(CreateRGBColor , reff.fill.color), StandardColors.white, Point(2.0, 1.0), 5 , 1) if reff.edge.visible: style.line_pattern = SolidPattern(apply(CreateRGBColor , reff.edge.color)) style.line_width = reff.edge.width if reff.edge.widthmode == 0: style.line_width = style.line_width * self.Scale style.line_dashes = reff.edge.dashtable[reff.edge.type - 1] self.prop_stack.AddStyle(style)
def phs(self, color, background, dx, dy, dist, width): self.pattern = HatchingPattern(self.convert_color(color), self.convert_color(background), Point(dx, dy), dist, width)