(self)
| 558 | return self.sr.exportScene() |
| 559 | |
| 560 | def drawRadarBG(self): |
| 561 | bgNode = dpg.add_draw_node(parent='radarBackground') |
| 562 | # eliminate the bias |
| 563 | dpgHeight = dpg.get_item_height('sEvaluation') - 30 |
| 564 | dpgWidth = dpg.get_item_width('sEvaluation') - 20 |
| 565 | centerx = dpgWidth / 2 |
| 566 | centery = dpgHeight / 2 |
| 567 | for i in range(4): |
| 568 | dpg.draw_circle(center=[centerx, centery], |
| 569 | radius=30 * (i + 1), |
| 570 | color=(223, 230, 233), |
| 571 | parent=bgNode) |
| 572 | |
| 573 | radarLabels = [ |
| 574 | "Offset", "Discomfort", "Collision", "Orientation", "Consumption" |
| 575 | ] |
| 576 | offset = np.array([[-0.3, 0.2], [-2.2, 0.3], [-2.3, 0.2], [-2.8, 0.5], |
| 577 | [-0.1, 0.5]]) * 30 |
| 578 | |
| 579 | axis_points = self._evaluation_transform_coordinate([4, 4, 4, 4, 4], |
| 580 | scale=30) |
| 581 | text_points = self._evaluation_transform_coordinate([1, 1, 1, 1, 1], |
| 582 | scale=140) |
| 583 | for j in range(5): |
| 584 | dpg.draw_line( |
| 585 | [centerx, centery], |
| 586 | axis_points[j], |
| 587 | color=(223, 230, 233), |
| 588 | parent=bgNode, |
| 589 | ) |
| 590 | |
| 591 | dpg.draw_text([ |
| 592 | text_points[j][0] + offset[j][0], |
| 593 | text_points[j][1] - offset[j][1] |
| 594 | ], |
| 595 | text=radarLabels[j], |
| 596 | size=20, |
| 597 | parent=bgNode) |
| 598 | |
| 599 | def drawMapBG(self): |
| 600 | # left-bottom: x1, y1 |
no test coverage detected