forked from Felk/dolphin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdolphin_gui.pyi
115 lines (81 loc) · 3 KB
/
dolphin_gui.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
"""
Module for doing stuff with the graphical user interface.
All colors are in ARGB.
All positions are (x, y) with (0, 0) being top left. X is the horizontal axis.
"""
from typing_extensions import TypeAlias
Position: TypeAlias = tuple[float, float]
def add_osd_message(message: str, duration_ms: int = 2000, color: int = 0xFFFFFF30) -> None:
"""
Adds a new message to the on-screen-display.
:param message: message to agg
:param duration_ms: how long the message should be visible for, in milliseconds
:param color: color of the message text as an int
"""
def clear_osd_messages() -> None:
"""Clear all on-screen-display messages."""
def get_display_size() -> tuple[float, float]:
""":return: The current display size in pixels."""
def draw_line(a: Position, b: Position, color: int, thickness: float = 1) -> None:
"""Draws a line from a to b."""
def draw_rect(
a: Position,
b: Position,
color: int,
rounding: float = 0,
thickness: float = 1,
) -> None:
"""Draws a hollow rectangle from a (upper left) to b (lower right)."""
def draw_rect_filled(a: Position, b: Position, color: int, rounding: float = 0) -> None:
"""Draws a filled rectangle from a (upper left) to b (lower right)."""
def draw_quad(
a: Position,
b: Position,
c: Position,
d: Position,
color: int,
thickness: float = 1,
) -> None:
"""
Draws a hollow quad through the points a, b, c and d.
Points should be defined in clockwise order.
"""
def draw_quad_filled(a: Position, b: Position, c: Position, d: Position, color: int) -> None:
"""Draws a filled quad through the points a, b, c and d."""
def draw_triangle(a: Position, b: Position, c: Position, color: int, thickness: float = 1) -> None:
"""Draws a hollow triangle through the points a, b and c."""
def draw_triangle_filled(a: Position, b: Position, c: Position, color: int) -> None:
"""Draws a filled triangle through the points a, b and c."""
def draw_circle(
center: Position,
radius: float,
color: int,
num_segments: int | None = None,
thickness: float = 1,
) -> None:
"""
Draws a hollow circle with the given center point and radius.
If num_segments is set to None (default), a sensible default is used.
"""
def draw_circle_filled(
center: Position, radius: float, color: int,
num_segments: int | None = None,
) -> None:
"""
Draws a filled circle with the given center point and radius.
If num_segments is set to None (default), a sensible default is used.
"""
def draw_text(pos: Position, color: int, text: str) -> None:
"""Draws text at a fixed position."""
def draw_polyline(
points: list[Position],
color: int,
closed: bool = False,
thickness: float = 1,
) -> None:
"""Draws a line through a list of points."""
def draw_convex_poly_filled(points: list[Position], color: int) -> None:
"""
Draws a convex polygon through a list of points.
Points should be defined in clockwise order.
"""