def draw_pixel(self, pos_x, pos_y, color=None): """draw a pixel at x,y""" if self.rotation == 90: pos_x, pos_y = self.height - pos_y - 1, pos_x if self.rotation == 180: pos_x, pos_y = self.width - pos_x - 1, self.height - pos_y - 1 if self.rotation == 270: pos_x, pos_y = pos_y, self.width - pos_x - 1 Page.draw_pixel(self, pos_x, pos_y, color)
def draw_pixel(self, pos_x, pos_y, color=None): """draw a pixel at x,y""" if self.rotation == 90 or self.rotation == 270: pos_x, pos_y = pos_y, pos_x Page.draw_pixel(self, pos_x, pos_y, color)