pyglet 2.1.12__py3-none-any.whl → 2.1.13__py3-none-any.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.
- pyglet/__init__.py +1 -1
- pyglet/display/win32.py +4 -1
- pyglet/libs/win32/__init__.py +3 -1
- pyglet/shapes.py +17 -7
- {pyglet-2.1.12.dist-info → pyglet-2.1.13.dist-info}/METADATA +1 -1
- {pyglet-2.1.12.dist-info → pyglet-2.1.13.dist-info}/RECORD +8 -8
- {pyglet-2.1.12.dist-info → pyglet-2.1.13.dist-info}/WHEEL +0 -0
- {pyglet-2.1.12.dist-info → pyglet-2.1.13.dist-info}/licenses/LICENSE +0 -0
pyglet/__init__.py
CHANGED
pyglet/display/win32.py
CHANGED
|
@@ -4,7 +4,7 @@ import ctypes
|
|
|
4
4
|
from ctypes import byref, sizeof
|
|
5
5
|
from typing import TYPE_CHECKING
|
|
6
6
|
|
|
7
|
-
from pyglet.libs.win32 import _gdi32,
|
|
7
|
+
from pyglet.libs.win32 import _gdi32, _user32
|
|
8
8
|
from pyglet.libs.win32.constants import (
|
|
9
9
|
CDS_FULLSCREEN,
|
|
10
10
|
DISP_CHANGE_SUCCESSFUL,
|
|
@@ -37,6 +37,9 @@ from pyglet.libs.win32.types import (
|
|
|
37
37
|
|
|
38
38
|
from .base import Canvas, Display, Screen, ScreenMode
|
|
39
39
|
|
|
40
|
+
if WINDOWS_8_1_OR_GREATER:
|
|
41
|
+
from pyglet.libs.win32 import _shcore
|
|
42
|
+
|
|
40
43
|
if TYPE_CHECKING:
|
|
41
44
|
from ctypes.wintypes import HDC, HMONITOR, LPARAM, LPRECT
|
|
42
45
|
|
pyglet/libs/win32/__init__.py
CHANGED
|
@@ -22,7 +22,9 @@ _dwmapi = DebugLibrary('dwmapi')
|
|
|
22
22
|
_shell32 = DebugLibrary('shell32')
|
|
23
23
|
_ole32 = DebugLibrary('ole32')
|
|
24
24
|
_oleaut32 = DebugLibrary('oleaut32')
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
if constants.WINDOWS_8_1_OR_GREATER:
|
|
27
|
+
_shcore = DebugLibrary('shcore')
|
|
26
28
|
|
|
27
29
|
# _gdi32
|
|
28
30
|
_gdi32.AddFontMemResourceEx.restype = HANDLE
|
pyglet/shapes.py
CHANGED
|
@@ -1414,12 +1414,22 @@ class Sector(ShapeBase):
|
|
|
1414
1414
|
def __contains__(self, point: tuple[float, float]) -> bool:
|
|
1415
1415
|
assert len(point) == 2
|
|
1416
1416
|
point = _rotate_point((self._x, self._y), point, math.radians(self._rotation))
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1417
|
+
if math.dist((self._x - self._anchor_x, self._y - self._anchor_y), point) > self._radius:
|
|
1418
|
+
return False
|
|
1419
|
+
angle = math.degrees(math.atan2(point[1] - self._y + self._anchor_y, point[0] - self._x + self._anchor_x))
|
|
1420
|
+
angle = angle % 360
|
|
1421
|
+
start_angle = self._start_angle % 360
|
|
1422
|
+
end_angle = (start_angle + self._angle) % 360
|
|
1423
|
+
if self._angle >= 0:
|
|
1424
|
+
if start_angle <= end_angle:
|
|
1425
|
+
return start_angle <= angle <= end_angle
|
|
1426
|
+
else:
|
|
1427
|
+
return angle >= start_angle or angle <= end_angle
|
|
1428
|
+
else:
|
|
1429
|
+
if end_angle <= start_angle:
|
|
1430
|
+
return end_angle <= angle <= start_angle
|
|
1431
|
+
else:
|
|
1432
|
+
return angle >= end_angle or angle <= start_angle
|
|
1423
1433
|
|
|
1424
1434
|
def _create_vertex_list(self) -> None:
|
|
1425
1435
|
self._vertex_list = self._program.vertex_list(
|
|
@@ -1437,7 +1447,7 @@ class Sector(ShapeBase):
|
|
|
1437
1447
|
y = -self._anchor_y
|
|
1438
1448
|
r = self._radius
|
|
1439
1449
|
segment_radians = math.radians(self._angle) / self._segments
|
|
1440
|
-
start_radians = math.radians(self._start_angle
|
|
1450
|
+
start_radians = math.radians(self._start_angle)
|
|
1441
1451
|
|
|
1442
1452
|
# Calculate the outer points of the sector.
|
|
1443
1453
|
points = [(x + (r * math.cos((i * segment_radians) + start_radians)),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pyglet/__init__.py,sha256=
|
|
1
|
+
pyglet/__init__.py,sha256=zUxv--HVC1haqqlM68yMJDA36TPqnn2rwq6uHWPCa7c,21155
|
|
2
2
|
pyglet/__init__.pyi,sha256=g-eSsTUa4WDTqTULiN7cRqagvW58NGCPLj9sabXRFjo,2005
|
|
3
3
|
pyglet/clock.py,sha256=ZiYHckYRIUKuN1XmywQc3Dastd7O40Lw2XeMjC3iMtk,21892
|
|
4
4
|
pyglet/customtypes.py,sha256=e9AB-8WPPhhZXqfDEf4r2Lv0vAQUBjwig5EBejBDz0k,608
|
|
@@ -8,7 +8,7 @@ pyglet/lib.py,sha256=Mj1W_KDmUQXMg1iPLrM0pIIHDyWPO38J6qvoU_hXKjc,12013
|
|
|
8
8
|
pyglet/math.py,sha256=lMCspxzd_pOeLQev5HAA92v8nYFPfGjfK-mbO6iHK3E,56117
|
|
9
9
|
pyglet/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
pyglet/resource.py,sha256=EknGIAxDuc8prrGd5faOM4MNPT2q6NN4r3KQlrRg2dM,29374
|
|
11
|
-
pyglet/shapes.py,sha256=
|
|
11
|
+
pyglet/shapes.py,sha256=itBnLMIiZoavXFODGcfGWAdFToJoM6-bjOe_jeaB0kg,98692
|
|
12
12
|
pyglet/sprite.py,sha256=DWMiCG1wO5ySEe_Wn7pPzgCOWiG1NceodtViD4nBbLg,28701
|
|
13
13
|
pyglet/util.py,sha256=OPu-Lw5Rxu1NMcsXBSM3Y-_3r2J09OjmdfUUAqSWvfg,8647
|
|
14
14
|
pyglet/app/__init__.py,sha256=AzV-eZLCSGJgqx8GEuOrOrJUtcUBBLHbw5oyyyni7e0,3043
|
|
@@ -21,7 +21,7 @@ pyglet/display/__init__.pyi,sha256=JRd3vFMahd1YC3r-uPgr99V9yAmiut1QZXKMFmstg5o,6
|
|
|
21
21
|
pyglet/display/base.py,sha256=o8TYTl1J4zdy4pRJy9HEz4sOLqmdVMhNRFcrTJKP4U8,10142
|
|
22
22
|
pyglet/display/cocoa.py,sha256=mW3Npw4PjeH29xnAuww6pRToO3Zh4v_xWTEVKubqIAA,6391
|
|
23
23
|
pyglet/display/headless.py,sha256=LwS0dHee0Y6oxPHidMvDVhIFqCDoBwNI0eQdXQgvtpE,2491
|
|
24
|
-
pyglet/display/win32.py,sha256=
|
|
24
|
+
pyglet/display/win32.py,sha256=JJwnVkxrgZQJZh0cjimL0Z8h8AEL8BLznDQ7QYAPYRg,9510
|
|
25
25
|
pyglet/display/xlib.py,sha256=6_SjJuqgDesW_jqwrQj7fjX3Csm8bVItnfBUxXds6BY,17264
|
|
26
26
|
pyglet/display/xlib_vidmoderestore.py,sha256=fkcVbCvwQ65UDvAxaIZb3JV_bAWONVgw7l-6UJhEXTs,5663
|
|
27
27
|
pyglet/experimental/README.md,sha256=bipJa3Y-kpEu9Uf_HNZJR00AAbfpUyGAKGEFdRY8YsI,222
|
|
@@ -132,7 +132,7 @@ pyglet/libs/egl/lib.py,sha256=IdQfLfRPbTckgNBEIUumdmEQ6iSWiy1nhTnkTTzaZ6M,893
|
|
|
132
132
|
pyglet/libs/wayland/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
133
133
|
pyglet/libs/wayland/gbm.py,sha256=iv6IKaB_U9t3s8njo0zy29rksbFPKEYlmGjF7wHjYr0,13388
|
|
134
134
|
pyglet/libs/wayland/xkbcommon.py,sha256=GCQ2mONKCi8MPwNfeL8t5JdszEoYhvEqrPUGDFE30xQ,20657
|
|
135
|
-
pyglet/libs/win32/__init__.py,sha256=
|
|
135
|
+
pyglet/libs/win32/__init__.py,sha256=oPvQ9y9V-9EZE39cLGNowgrfpkNdOi1gecgLNH9C4RI,15127
|
|
136
136
|
pyglet/libs/win32/com.py,sha256=E4lzOzkmPRbV0F6Hj1MH_PQK46N_-USaOjPJbjgrXpM,17607
|
|
137
137
|
pyglet/libs/win32/constants.py,sha256=gL787XYVx2d63ue5dVu1HXCONfZc64yUiRFihpD3P9M,121484
|
|
138
138
|
pyglet/libs/win32/context_managers.py,sha256=pNCpws8Xc-HP19jC42gtWSdC9m1s6sP8H-0mFyiEz0A,1433
|
|
@@ -228,7 +228,7 @@ pyglet/window/cocoa/systemcursor.py,sha256=-rMhvPH3DWl4gsSTCUbkn-yUnbyKM7JdQLfb5
|
|
|
228
228
|
pyglet/window/headless/__init__.py,sha256=QT3vdaa8qIJVm9B8u17c9-agIG_wrbAIPExNdIFuNjI,3254
|
|
229
229
|
pyglet/window/win32/__init__.py,sha256=rmxohCsReTiEbMmegLxjvzH8NnERbd2jbvdz_zbzCqA,55910
|
|
230
230
|
pyglet/window/xlib/__init__.py,sha256=_SmSwQlhiYx37P-jMR3WVZDDQV9A3O6qFNvPrzSDfwE,70725
|
|
231
|
-
pyglet-2.1.
|
|
232
|
-
pyglet-2.1.
|
|
233
|
-
pyglet-2.1.
|
|
234
|
-
pyglet-2.1.
|
|
231
|
+
pyglet-2.1.13.dist-info/licenses/LICENSE,sha256=V-fuy2c8jUDPMZJjPEgH-6jIFoUymjfht2PhVW1d7TQ,1546
|
|
232
|
+
pyglet-2.1.13.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
233
|
+
pyglet-2.1.13.dist-info/METADATA,sha256=eBVNY-EXhA_dIbPGTPuklvYYvR-UXdeMPfYQbws6mHQ,7673
|
|
234
|
+
pyglet-2.1.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|