Browse Source

Document new Font:setPixelDensity variant;

bjorn 6 years ago
parent
commit
19ff1aaf74
2 changed files with 18 additions and 3 deletions
  1. 5 0
      api/init.lua
  2. 13 3
      api/lovr/graphics/Font/setPixelDensity.lua

+ 5 - 0
api/init.lua

@@ -5986,6 +5986,11 @@ return {
                     }
                   },
                   returns = {}
+                },
+                {
+                  description = "Reset the pixel density to the default (`font:getRasterizer():getHeight()`).",
+                  arguments = {},
+                  returns = {}
                 }
               }
             }

+ 13 - 3
api/lovr/graphics/Font/setPixelDensity.lua

@@ -5,11 +5,21 @@ return {
     a 2D texture, the units are pixels.
   ]],
   arguments = {
-    {
-      name = 'pixelDensity',
+    pixelDensity = {
       type = 'number',
       description = 'The new pixel density.'
     }
   },
-  returns = {}
+  returns = {},
+  variants = {
+    {
+      arguments = { 'pixelDensity' },
+      returns = {}
+    },
+    {
+      description = 'Reset the pixel density to the default (`font:getRasterizer():getHeight()`).',
+      arguments = {},
+      returns = {}
+    }
+  }
 }