godot/component/polygon.py
def _draw_mainlayer(self, gc, view_bounds=None, mode="default"):
        """ Draws a closed polygon """

        gc.save_state()
        try:
#            self._draw_bounds(gc)
            if len(self.points) >= 2:
                # Set the drawing parameters.
                gc.set_fill_color(self.pen.fill_color_)
                gc.set_stroke_color(self.pen.color_)
                gc.set_line_width(self.pen.line_width)

                # Draw the path.
                gc.begin_path()
#                x0 = self.points[0][0] - self.x
#                y0 = self.points[0][1] + self.y
#                gc.move_to(x0, y0)
#                offset_points = [(x-self.x, y+self.y) for x, y in self.points]
                gc.lines(self.points)

                gc.close_path()
                if self.filled:
                    gc.draw_path(self.inside_rule_)
                else:
                    gc.stroke_path()
        finally:
            gc.restore_state()
def _draw_mainlayer(self, gc, view_bounds=None, mode="default"):
        """ Draws a closed polygon """

        gc.save_state()
        try:
#            self._draw_bounds(gc)
            if len(self.points) >= 2:
                # Set the drawing parameters.
                gc.set_fill_color(self.pen.fill_color_)
                gc.set_stroke_color(self.pen.color_)
                gc.set_line_width(self.pen.line_width)

                # Draw the path.
                gc.begin_path()
#                x0 = self.points[0][0] - self.x
#                y0 = self.points[0][1] + self.y
#                gc.move_to(x0, y0)
#                offset_points = [(x-self.x, y+self.y) for x, y in self.points]
                gc.lines(self.points)

                gc.close_path()
                if self.filled:
                    gc.draw_path(self.inside_rule_)
                else:
                    gc.stroke_path()
        finally:
            gc.restore_state()
Draws a closed polygon