def sketch(self, img, w=1, color=None): pen = paint.Paint() for i in self.body: xs, ys = [x[0] for x in i[0]], [x[1] for x in i[0]] pen.draw_path(img, xs, ys, w) for j in i[1]: xs, ys = [x[0] for x in j], [x[1] for x in j] pen.draw_path(img, xs, ys, w, color)
def fill(self, img, color=None): pen = paint.Paint() pen.fill_polygon(self.body, img, [], color)
def sketch(self, img, w=1, color=None): pen = paint.Paint() xs, ys = [x[0] for x in self.body], [x[1] for x in self.body] pen.draw_path(img, xs, ys, w, color)
def sketch(self, img, w=1, color=None): pen = paint.Paint() for i in self.body: pen.draw_point(img, i[0], i[1], w, color)
def fill(self, img, color=None): pen = paint.Paint() for i in self.body: pen.fill_polygon(i[0], img, i[1], color)
def __init__(self): self.sta = 0 self.paint = paint.Paint() self.cursor = wx.CURSOR_CROSS