diff --git a/SketchWidget.py b/SketchWidget.py index 76185f4..a189cb5 100644 --- a/SketchWidget.py +++ b/SketchWidget.py @@ -115,6 +115,13 @@ class SketchWidget: glVertex(x1 + x_right, y1 + y_right) glVertex(x1 + x_left, y1 + y_left) glEnd() + self.drawFilledCircle(x0, y0, size, 16) + self.drawFilledCircle(x1, y1, size, 16) def drawFilledCircle(self, x, y, radius, steps): - pass + glBegin(GL_TRIANGLE_FAN) + glVertex(x, y) + for i in range(steps + 1): + angle = i * 2 * math.pi / steps + glVertex(x + radius * math.cos(angle), y + radius * math.sin(angle)) + glEnd()