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
---@meta
---@class (exact) Screen: ScreenMethods
---@class ScreenClass : ScreenMethods
local module =
---@class ScreenMethods
local methods =
---Create a new screen of the provided size. It will always keep this aspect ratio,
---but its size will scale incrementally to fill as much window space as possible.
---@param w integer
---@param h integer
---@param fractional boolean
---@return Screen
---@nodiscard
---Create a new screen that will always have the provided pixel scale, and its size
---will be calculated to fit as much of the window as possible.
---@param scale number
---@return Screen
---@nodiscard
---The screen's render surface.
---@param self Screen
---@return Surface
---@nodiscard
---The screen's size.
---@param self Screen
---@return Vec2
---@nodiscard
---The screen's width.
---@param self Screen
---@return integer
---@nodiscard
---The screen's height.
---@param self Screen
---@return integer
---@nodiscard
---Where the screen will draw on the window.
---@param self Screen
---@return Rect
---@nodiscard
---The screen's pixel scale.
---@param self Screen
---@return number
---@nodiscard
---Mouse position in screen space.
---@param self Screen
---@return Vec2
---@nodiscard
---Mouse x-position in screen space.
---@param self Screen
---@return number
---@nodiscard
---Mouse y-position in screen space.
---@param self Screen
---@return number
---@nodiscard
---Update the screen surface and mouse position. Should be called at the
---beginning of every frame the screen will be used.
---@param self Screen
---Maps the position from window to screen space.
---@param self Screen
---@param pos Vec2
---@return Vec2
---@nodiscard
---Maps the position from window to screen space.
---@param self Screen
---@param x number
---@param y number
---@return number
---@return number
---@nodiscard
---Make this screen's surface the render target.
---@param self Screen
---@param draw Draw
---@param clear_color Color?
---Draws the screen to the window.
---@param self Screen
---@param draw Draw
---@param clear_color Color?
return module