From 2846bdd21c067bc30ad2d7f4fe252b169c2b6302 Mon Sep 17 00:00:00 2001 From: PGijsbers Date: Sun, 16 Mar 2025 23:48:50 +0200 Subject: [PATCH] Document the meaning of display/window/stretch/aspect --- doc/classes/ProjectSettings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 24c9868081c1..c72f37998c05 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -916,6 +916,12 @@ [b]Note:[/b] By default, or when set to [code]0[/code], the initial window width is the [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and Web. + Defines if and how the aspect ratio of the root [Viewport] should be preserved when stretching is applied. + [b]"ignore"[/b]: Keep the width and height of the viewport. If the aspect ratio of the window or screen does not match that of the viewport, stretch the render to fill it. + [b]"keep"[/b]: Keep the width and height of the viewport. If the aspect ratio of the window or screen does not match that of the viewport, empty space is filled with black. + [b]"keep_width"[/b]: Keep the width of the viewport, but allow its height to expand. If the aspect ratio of the window or screen is greater, the game is shown centered with vertical black bars. If the aspect ratio is smaller, the viewport is expanded vertically downwards. + [b]"keep_height"[/b]: Keep the height of the viewport, but allow its width to expand. If the aspect ratio of the window or screen is smaller, the game is shown centered with horizontal black bars. If the aspect ratio is greater, the viewport is expanded horizontally to the right. + [b]"expand"[/b]: Allow the viewport to expand in either direction to fill the screen or window. If the aspect ratio of the window or screen is greater, the game is expanded horizontally to the right. If the aspect ratio is smaller, the viewport is expanded vertically downwards. Defines how the base size is stretched to fit the resolution of the window or screen.