def drawShapes(self, context): """ Draws the shapes in the map to the given context @type context: cairo.Context @param context: context to draw on """ for shape in self.__world.getShapes(): graphics.drawShape(shape, context)
def do_expose_event(self, event): context = self.window.cairo_create() context.set_source(self.__checkerBoard) context.paint() size = self.window.get_size() graphics.drawGrid(context, 16, size[0], size[1]) for shape in self.shapes: graphics.drawShape(shape, context, True)
def draw(self, context): if self.__drawing == True: graphics.drawShape(self.__polygon, context, True) ShapeTool.draw(self, context)
def draw(self, context): if self.__drawing: graphics.drawShape(self.__circle, context, True) ShapeTool.draw(self, context)