mini-arcade-native-backend 0.3.5__cp39-cp39-win_amd64.whl → 0.4.0__cp39-cp39-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mini_arcade_native_backend/__init__.py +8 -2
- mini_arcade_native_backend/_native.cp39-win_amd64.pyd +0 -0
- {mini_arcade_native_backend-0.3.5.dist-info → mini_arcade_native_backend-0.4.0.dist-info}/METADATA +1 -1
- mini_arcade_native_backend-0.4.0.dist-info/RECORD +6 -0
- mini_arcade_native_backend-0.3.5.dist-info/RECORD +0 -6
- {mini_arcade_native_backend-0.3.5.dist-info → mini_arcade_native_backend-0.4.0.dist-info}/WHEEL +0 -0
- {mini_arcade_native_backend-0.3.5.dist-info → mini_arcade_native_backend-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -70,6 +70,7 @@ class NativeBackend(Backend):
|
|
|
70
70
|
self._engine = native.Engine()
|
|
71
71
|
self._font_path = font_path
|
|
72
72
|
self._font_size = font_size
|
|
73
|
+
self._default_font_id: int | None = None
|
|
73
74
|
|
|
74
75
|
def init(self, width: int, height: int, title: str):
|
|
75
76
|
"""
|
|
@@ -88,7 +89,9 @@ class NativeBackend(Backend):
|
|
|
88
89
|
|
|
89
90
|
# Load font if provided
|
|
90
91
|
if self._font_path is not None:
|
|
91
|
-
self._engine.load_font(
|
|
92
|
+
self._default_font_id = self._engine.load_font(
|
|
93
|
+
self._font_path, self._font_size
|
|
94
|
+
)
|
|
92
95
|
|
|
93
96
|
def set_clear_color(self, r: int, g: int, b: int):
|
|
94
97
|
"""
|
|
@@ -192,7 +195,10 @@ class NativeBackend(Backend):
|
|
|
192
195
|
"""
|
|
193
196
|
# We rely on C++ side to no-op if font is missing
|
|
194
197
|
r, g, b = color
|
|
195
|
-
|
|
198
|
+
font_id = (
|
|
199
|
+
self._default_font_id if self._default_font_id is not None else -1
|
|
200
|
+
)
|
|
201
|
+
self._engine.draw_text(text, x, y, int(r), int(g), int(b), font_id)
|
|
196
202
|
|
|
197
203
|
def capture_frame(self, path: str | None = None) -> bool:
|
|
198
204
|
"""
|
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mini_arcade_native_backend/__init__.py,sha256=c5nVK2IazMmQs7-aWo4kAFW-JIN12gAs2blJWwgeHIk,6875
|
|
2
|
+
mini_arcade_native_backend/_native.cp39-win_amd64.pyd,sha256=IUWx0vkhqd5kMWkyKewj99FqJpM6REB8SWPMqnY-pVc,220672
|
|
3
|
+
mini_arcade_native_backend-0.4.0.dist-info/METADATA,sha256=Z8NcXEfzaLWgM3wRBflD7MlJv4HbsyYO_8A3tW3PfZg,10519
|
|
4
|
+
mini_arcade_native_backend-0.4.0.dist-info/WHEEL,sha256=9tsL4JT94eZPTkcS3bNng2riasYJMxXndrO9CxUfJHs,104
|
|
5
|
+
mini_arcade_native_backend-0.4.0.dist-info/licenses/LICENSE,sha256=cZRgTdRJ3YASekMxkGAvylB2nROh4ov228DxAogK3yY,1115
|
|
6
|
+
mini_arcade_native_backend-0.4.0.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
mini_arcade_native_backend/__init__.py,sha256=QmgzE3psHKW59_vp-ZCS7CPe53YhoXqEJCjrdaQckGY,6648
|
|
2
|
-
mini_arcade_native_backend/_native.cp39-win_amd64.pyd,sha256=RMqI6WAxeYxzgG2onKlGIlWFYWlr6lBtg6Tn_FJsyyQ,219648
|
|
3
|
-
mini_arcade_native_backend-0.3.5.dist-info/METADATA,sha256=A3gIz5wFRc8fQi_Ks-t0Dbqn-7JdbAzVzU99rq_2niQ,10519
|
|
4
|
-
mini_arcade_native_backend-0.3.5.dist-info/WHEEL,sha256=9tsL4JT94eZPTkcS3bNng2riasYJMxXndrO9CxUfJHs,104
|
|
5
|
-
mini_arcade_native_backend-0.3.5.dist-info/licenses/LICENSE,sha256=cZRgTdRJ3YASekMxkGAvylB2nROh4ov228DxAogK3yY,1115
|
|
6
|
-
mini_arcade_native_backend-0.3.5.dist-info/RECORD,,
|
{mini_arcade_native_backend-0.3.5.dist-info → mini_arcade_native_backend-0.4.0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|