|
5 | 5 | import math |
6 | 6 |
|
7 | 7 | from qtpy import QtWidgets, QtCore, QtGui |
| 8 | +from qtpy.QtCore import QRectF # stonebig |
8 | 9 |
|
9 | 10 | from rocket import BaseRocketGame |
10 | 11 |
|
@@ -71,16 +72,21 @@ def wasm_clear_screen(self) -> None: # [] -> [] |
71 | 72 |
|
72 | 73 | def wasm_draw_bullet(self, x: float, y: float) -> None: # [(0, 'f64'), (1, 'f64')] -> [] |
73 | 74 | self._painter.setBrush(QtGui.QColor('#0f0')) |
74 | | - self._painter.drawEllipse(x, y, REL_SIZE*3, REL_SIZE*3) |
| 75 | + # self._painter.drawEllipse(x, y, REL_SIZE*3, REL_SIZE*3) |
| 76 | + rect = QRectF(x, y, REL_SIZE*3, REL_SIZE*3) # stonebig |
| 77 | + self._painter.drawEllipse(rect) # stonebig |
75 | 78 |
|
76 | 79 | def wasm_draw_enemy(self, x: float, y: float) -> None: # [(0, 'f64'), (1, 'f64')] -> [] |
77 | 80 | self._painter.setBrush(QtGui.QColor('#ff0')) |
78 | | - self._painter.drawEllipse(x, y, REL_SIZE*14, REL_SIZE*14) |
| 81 | + # self._painter.drawEllipse(x, y, REL_SIZE*14, REL_SIZE*14) # stonebig |
| 82 | + rect = QRectF(x, y, REL_SIZE*14, REL_SIZE*14) # stonebig |
| 83 | + self._painter.drawEllipse(rect) # stonebig |
79 | 84 |
|
80 | 85 | def wasm_draw_particle(self, x: float, y: float, a: float) -> None: # [(0, 'f64'), (1, 'f64'), (2, 'f64')] -> [] |
81 | 86 | self._painter.setBrush(QtGui.QColor('#f04')) |
82 | | - self._painter.drawEllipse(x, y, REL_SIZE, REL_SIZE) |
83 | | - |
| 87 | + # self._painter.drawEllipse(x, y, REL_SIZE, REL_SIZE) # stonebig |
| 88 | + rect = QRectF(x, y, REL_SIZE, REL_SIZE) # stonebig |
| 89 | + self._painter.drawEllipse(rect) # stonebig |
84 | 90 | def wasm_draw_player(self, x: float, y: float, a: float) -> None: # [(0, 'f64'), (1, 'f64'), (2, 'f64')] -> [] |
85 | 91 | p = QtGui.QPainterPath() |
86 | 92 | self._painter.save() |
|
0 commit comments