def draw_shape_rect(self): graphics.enable_line_stipple() graphics.set_line_width(1.0) graphics.set_color(color=graphics.get_line_color()) draw.rect_outline( self.img_x+1, self.img_y+1, self.img_x+abs(self.w)-1, self.img_y+abs(self.h)-1 ) graphics.disable_line_stipple()
def keep_drawing(self, x, y, dx, dy): self.x2, self.y2 = x, y graphics.set_color(1,1,1,1) draw.image(self.canvas_pre,graphics.canvas_x,graphics.canvas_y) if graphics.fill_shapes: draw.rect(self.x1, self.y1, self.x2, self.y2, self.fill_colors) if graphics.outline_shapes: graphics.set_line_width(graphics.user_line_size) graphics.set_color(color=self.line_color) draw.rect_outline(self.x1, self.y1, self.x2, self.y2)