(rectangle, color = (0.8, 0.8, 0.8, 1.0))
| 2 | from bgl import glBegin, glVertex2f, glEnd, GL_POLYGON, glEnable, glDisable, GL_POLYGON_SMOOTH, GL_BLEND, glColor4f, GL_LINE_STRIP, glLineWidth, GL_LINES, glViewport |
| 3 | |
| 4 | def draw_rectangle(rectangle, color = (0.8, 0.8, 0.8, 1.0)): |
| 5 | glColor4f(*color) |
| 6 | glEnable(GL_BLEND) |
| 7 | glBegin(GL_POLYGON) |
| 8 | glVertex2f(rectangle.left, rectangle.top) |
| 9 | glVertex2f(rectangle.right, rectangle.top) |
| 10 | glVertex2f(rectangle.right, rectangle.bottom) |
| 11 | glVertex2f(rectangle.left, rectangle.bottom) |
| 12 | glEnd() |
| 13 | |
| 14 | def draw_rectangle_border(rectangle, thickness = 1, color = (0.1, 0.1, 0.1, 1.0)): |
| 15 | glColor4f(*color) |
no outgoing calls
no test coverage detected