def draw_rect(self, position, size, fill=None): assert self.dc is not None draw = self.dc[1] x2, y2 = position x2 += size[0] y2 += size[1] draw.rectangle([position, (x2 - 1, y2 - 1)], fill=fill)
def draw_rect(self, position, size, fill=None): position=self.calc_mag(position) size=self.calc_mag(size) draw = self.dc[1] x2, y2 = position x2 += size[0] y2 += size[1] draw.rectangle([position, (x2-1, y2-1)], fill=fill)