def draw_anti_aliased_pixels(self, x, y1, y2, color):
y_max = max(y1, y2)<EOL>y_max_int = int(y_max)<EOL>alpha = y_max - y_max_int<EOL>if alpha > <NUM_LIT:0.0> and alpha < <NUM_LIT:1.0> and y_max_int + <NUM_LIT:1> < self.image_height:<EOL><INDENT>current_pix = self.pixel[int(x), y_max_int + <NUM_LIT:1>]<EOL>r = int((<NUM_LIT:1> - alpha) * current_pix[<NUM_LIT:0>] + alpha * color[<NUM_LIT:0>])<EOL>g = int((<NUM_LIT:1> - alpha) * current_pix[<NUM_LIT:1>] + alpha * color[<NUM_LIT:1>])<EOL>b = int((<NUM_LIT:1> - alpha) * current_pix[<NUM_LIT:2>] + alpha * color[<NUM_LIT:2>])<EOL>self.pixel[x, y_max_int + <NUM_LIT:1>] = (r, g, b)<EOL><DEDENT>y_min = min(y1, y2)<EOL>y_min_int = int(y_min)<EOL>alpha = <NUM_LIT:1.0> - (y_min - y_min_int)<EOL>if alpha > <NUM_LIT:0.0> and alpha < <NUM_LIT:1.0> and y_min_int - <NUM_LIT:1> >= <NUM_LIT:0>:<EOL><INDENT>current_pix = self.pixel[x, y_min_int - <NUM_LIT:1>]<EOL>r = int((<NUM_LIT:1> - alpha) * current_pix[<NUM_LIT:0>] + alpha * color[<NUM_LIT:0>])<EOL>g = int((<NUM_LIT:1> - alpha) * current_pix[<NUM_LIT:1>] + alpha * color[<NUM_LIT:1>])<EOL>b = int((<NUM_LIT:1> - alpha) * current_pix[<NUM_LIT:2>] + alpha * color[<NUM_LIT:2>])<EOL>self.pixel[x, y_min_int - <NUM_LIT:1>] = (r, g, b)<EOL><DEDENT>
vertical anti-aliasing at y1 and y2