You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: meta/3rd/lovr/library/callback.lua
+4-10
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@
9
9
---
10
10
---
11
11
---### NOTE:
12
-
---Disabling the headset module can improve startup time a lot if you aren't intending to use `lovr.headset`.
12
+
---Disabling unused modules can improve startup time.
13
13
---
14
-
---You can set `t.window` to nil to avoid creating the window. You can do it yourself later by using `lovr.graphics.createWindow`.
14
+
---`t.window` can be set to nil to avoid creating the window.
15
15
---
16
-
---If the `lovr.graphics` module is disabled or the window isn't created, attempting to use any functionality requiring graphics may cause a crash.
16
+
---The window can later be opened manually using `lovr.system.openWindow`.
17
17
---
18
18
---Enabling the `t.graphics.debug` flag will add additional error checks and will send messages from the GPU driver to the `lovr.log` callback.
19
19
---
@@ -118,13 +118,7 @@ lovr.log = nil
118
118
---
119
119
---It can be overridden for custom mirroring behavior.
120
120
---
121
-
---For example, you could render a single eye instead of a stereo view, apply postprocessing effects, add 2D UI, or render the scene from an entirely different viewpoint for a third person camera.
122
-
---
123
-
---
124
-
---### NOTE:
125
-
---When this callback is called, the camera is located at `(0, 0, 0)` and is looking down the negative-z axis.
126
-
---
127
-
---Note that the usual graphics state applies while `lovr.mirror` is invoked, so you may need to reset graphics state at the end of `lovr.draw` to get the result you want.
121
+
---For example, a stereo view could be drawn instead of a single eye or a 2D HUD could be rendered.
---@paramthreeboolean # Whether the control points should be 3D or 2D.
817
+
---@returntable curves # A table of curves. Each curve is a table of numbers representing the control points (2 for a line, 3 for a quadratic curve, etc.).
818
+
functionRasterizer:getCurves(character, three) end
819
+
787
820
---
788
821
---Returns the descent metric of the font, in pixels.
789
822
---
@@ -792,33 +825,88 @@ function Rasterizer:getAscent() end
792
825
---@returnnumber descent # The descent of the font, in pixels.
793
826
functionRasterizer:getDescent() end
794
827
828
+
---
829
+
---Returns the dimensions of a glyph, or the dimensions of any glyph.
830
+
---
831
+
---@overloadfun(self: lovr.Rasterizer, codepoint: number):number, number
832
+
---@overloadfun(self: lovr.Rasterizer):number, number
833
+
---@paramcharacterstring # A character.
834
+
---@returnnumber width # The width, in pixels.
835
+
---@returnnumber height # The height, in pixels.
836
+
functionRasterizer:getDimensions(character) end
837
+
838
+
---
839
+
---Returns the size of the font, in pixels.
840
+
---
841
+
---This is the size the rasterizer was created with, and defines the size of images it rasterizes.
842
+
---
843
+
---@returnnumber size # The font size, in pixels.
844
+
functionRasterizer:getFontSize() end
845
+
795
846
---
796
847
---Returns the number of glyphs stored in the font file.
797
848
---
798
849
---@returnnumber count # The number of glyphs stored in the font file.
799
850
functionRasterizer:getGlyphCount() end
800
851
801
852
---
802
-
---Returns the height metric of the font, in pixels.
853
+
---Returns the height of a glyph, or the maximum height of any glyph.
0 commit comments