def METHOD_NAME(self, widget, ctx):
    # print("Draw")
    if not ctx:
        print("Draw with no cairo context")
        ctx = widget.get_window().cairo_create()
    ctx.set_source_rgb(self.bg_color.red, self.bg_color.green,
                       self.bg_color.blue)
    ctx.rectangle(0, 0, self.width, self.height)
    ctx.fill()
    # This makes no sense: specified line width has to be one less here
    # than it does in idle_cb to result in the same line width.
    ctx.set_line_width(self.line_width-1)
    for i, path in enumerate(self.planet_paths):
        if not path:
            continue
        ctx.set_source_rgb(*color_to_triplet(self.planet_colors[i]))
        self.planet_segment(ctx, *path[0], False)
        for pair in path[1:]:
            self.planet_segment(ctx, *pair, True)
        ctx.stroke()