From c8db5ec6e0fac16254d31860abc3f5510c3ae7c7 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 13 Sep 2025 02:14:19 +0000 Subject: [PATCH] classref: Sync with current master branch (bfa330d) --- classes/class_canvasitem.rst | 54 ++++++++++++++++---------------- classes/class_webxrinterface.rst | 4 +-- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index b35717dcc..2ad406e6b 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -836,7 +836,7 @@ Subsequent drawing commands will be ignored unless they fall within the specifie |void| **draw_arc**\ (\ center\: :ref:`Vector2`, radius\: :ref:`float`, start_angle\: :ref:`float`, end_angle\: :ref:`float`, point_count\: :ref:`int`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws an unfilled arc between the given angles with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). The larger the value of ``point_count``, the smoother the curve. See also :ref:`draw_circle()`. +Draws an unfilled arc between the given angles with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). The larger the value of ``point_count``, the smoother the curve. ``center`` is defined in local space. See also :ref:`draw_circle()`. If ``width`` is negative, it will be ignored and the arc will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -852,7 +852,7 @@ The arc is drawn from ``start_angle`` towards the value of ``end_angle`` so in c |void| **draw_char**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`🔗` -Draws a string first character using a custom font. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. +Draws a string first character using a custom font. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. ``pos`` is defined in local space. .. rst-class:: classref-item-separator @@ -864,7 +864,7 @@ Draws a string first character using a custom font. If ``oversampling`` is great |void| **draw_char_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, size\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`🔗` -Draws a string first character outline using a custom font. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. +Draws a string first character outline using a custom font. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. ``pos`` is defined in local space. .. rst-class:: classref-item-separator @@ -876,7 +876,7 @@ Draws a string first character outline using a custom font. If ``oversampling`` |void| **draw_circle**\ (\ position\: :ref:`Vector2`, radius\: :ref:`float`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws a circle. See also :ref:`draw_arc()`, :ref:`draw_polyline()`, and :ref:`draw_polygon()`. +Draws a circle, with ``position`` defined in local space. See also :ref:`draw_arc()`, :ref:`draw_polyline()`, and :ref:`draw_polygon()`. If ``filled`` is ``true``, the circle will be filled with the ``color`` specified. If ``filled`` is ``false``, the circle will be drawn as a stroke with the ``color`` and ``width`` specified. @@ -896,7 +896,7 @@ If ``antialiased`` is ``true``, half transparent "feathers" will be attached to |void| **draw_colored_polygon**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) :ref:`🔗` -Draws a colored polygon of any number of points, convex or concave. Unlike :ref:`draw_polygon()`, a single color must be specified for the whole polygon. +Draws a colored polygon of any number of points, convex or concave. The points in the ``points`` array are defined in local space. Unlike :ref:`draw_polygon()`, a single color must be specified for the whole polygon. \ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon()` and using :ref:`draw_mesh()`, :ref:`draw_multimesh()`, or :ref:`RenderingServer.canvas_item_add_triangle_array()`. @@ -910,7 +910,7 @@ Draws a colored polygon of any number of points, convex or concave. Unlike :ref: |void| **draw_dashed_line**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, dash\: :ref:`float` = 2.0, aligned\: :ref:`bool` = true, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws a dashed line from a 2D point to another, with a given color and width. See also :ref:`draw_line()`, :ref:`draw_multiline()`, and :ref:`draw_polyline()`. +Draws a dashed line from a 2D point to another, with a given color and width. The ``from`` and ``to`` positions are defined in local space. See also :ref:`draw_line()`, :ref:`draw_multiline()`, and :ref:`draw_polyline()`. If ``width`` is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -942,7 +942,7 @@ After submitting all animations slices via :ref:`draw_animation_slice()`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`🔗` -Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color. +Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color. The ``rect`` is defined in local space. Texture is drawn using the following blend operation, blend mode of the :ref:`CanvasItemMaterial` is ignored: @@ -963,7 +963,7 @@ Texture is drawn using the following blend operation, blend mode of the :ref:`Ca |void| **draw_line**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also :ref:`draw_dashed_line()`, :ref:`draw_multiline()`, and :ref:`draw_polyline()`. +Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. The ``from`` and ``to`` positions are defined in local space. See also :ref:`draw_dashed_line()`, :ref:`draw_multiline()`, and :ref:`draw_polyline()`. If ``width`` is negative, then a two-point primitive will be drawn instead of a four-point one. This means that when the CanvasItem is scaled, the line will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -977,7 +977,7 @@ If ``width`` is negative, then a two-point primitive will be drawn instead of a |void| **draw_mesh**\ (\ mesh\: :ref:`Mesh`, texture\: :ref:`Texture2D`, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`🔗` -Draws a :ref:`Mesh` in 2D, using the provided texture. See :ref:`MeshInstance2D` for related documentation. +Draws a :ref:`Mesh` in 2D, using the provided texture. See :ref:`MeshInstance2D` for related documentation. The ``transform`` is defined in local space. .. rst-class:: classref-item-separator @@ -989,7 +989,7 @@ Draws a :ref:`Mesh` in 2D, using the provided texture. See :ref:`Mes |void| **draw_msdf_texture_rect_region**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), outline\: :ref:`float` = 0.0, pixel_range\: :ref:`float` = 4.0, scale\: :ref:`float` = 1.0\ ) :ref:`🔗` -Draws a textured rectangle region of the multichannel signed distance field texture at a given position, optionally modulated by a color. See :ref:`FontFile.multichannel_signed_distance_field` for more information and caveats about MSDF font rendering. +Draws a textured rectangle region of the multichannel signed distance field texture at a given position, optionally modulated by a color. The ``rect`` is defined in local space. See :ref:`FontFile.multichannel_signed_distance_field` for more information and caveats about MSDF font rendering. If ``outline`` is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the ``outline`` radius. @@ -1005,7 +1005,7 @@ Value of the ``pixel_range`` should the same that was used during distance field |void| **draw_multiline**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws multiple disconnected lines with a uniform ``width`` and ``color``. Each line is defined by two consecutive points from ``points`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw interconnected lines, use :ref:`draw_polyline()` instead. +Draws multiple disconnected lines with a uniform ``width`` and ``color``. Each line is defined by two consecutive points from ``points`` array in local space, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw interconnected lines, use :ref:`draw_polyline()` instead. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1021,7 +1021,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f |void| **draw_multiline_colors**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Each segment is defined by two consecutive points from ``points`` array and a corresponding color from ``colors`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints and has ``colors[i]`` color. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw interconnected lines, use :ref:`draw_polyline_colors()` instead. +Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Each segment is defined by two consecutive points from ``points`` array in local space and a corresponding color from ``colors`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints and has ``colors[i]`` color. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw interconnected lines, use :ref:`draw_polyline_colors()` instead. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1037,7 +1037,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f |void| **draw_multiline_string**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`🔗` -Breaks ``text`` into lines and draws it using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. +Breaks ``text`` into lines and draws it using the specified ``font`` at the ``pos`` in local space (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. .. rst-class:: classref-item-separator @@ -1049,7 +1049,7 @@ Breaks ``text`` into lines and draws it using the specified ``font`` at the ``po |void| **draw_multiline_string_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`🔗` -Breaks ``text`` to the lines and draws text outline using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. +Breaks ``text`` to the lines and draws text outline using the specified ``font`` at the ``pos`` in local space (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. .. rst-class:: classref-item-separator @@ -1073,7 +1073,7 @@ Draws a :ref:`MultiMesh` in 2D with the provided texture. See : |void| **draw_polygon**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) :ref:`🔗` -Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon()`, each point's color can be changed individually. See also :ref:`draw_polyline()` and :ref:`draw_polyline_colors()`. If you need more flexibility (such as being able to use bones), use :ref:`RenderingServer.canvas_item_add_triangle_array()` instead. +Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon()`, each point's color can be changed individually. The ``points`` array is defined in local space. See also :ref:`draw_polyline()` and :ref:`draw_polyline_colors()`. If you need more flexibility (such as being able to use bones), use :ref:`RenderingServer.canvas_item_add_triangle_array()` instead. \ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon()` and using :ref:`draw_mesh()`, :ref:`draw_multimesh()`, or :ref:`RenderingServer.canvas_item_add_triangle_array()`. @@ -1087,7 +1087,7 @@ Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`d |void| **draw_polyline**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw disconnected lines, use :ref:`draw_multiline()` instead. See also :ref:`draw_polygon()`. +Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). The ``points`` array is defined in local space. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw disconnected lines, use :ref:`draw_multiline()` instead. See also :ref:`draw_polygon()`. If ``width`` is negative, it will be ignored and the polyline will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1101,7 +1101,7 @@ If ``width`` is negative, it will be ignored and the polyline will be drawn usin |void| **draw_polyline_colors**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws interconnected line segments with a uniform ``width``, point-by-point coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line points match by index between ``points`` and ``colors``, i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw disconnected lines, use :ref:`draw_multiline_colors()` instead. See also :ref:`draw_polygon()`. +Draws interconnected line segments with a uniform ``width``, point-by-point coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line points match by index between ``points`` and ``colors``, i.e. each line segment is filled with a gradient between the colors of the endpoints. The ``points`` array is defined in local space. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw disconnected lines, use :ref:`draw_multiline_colors()` instead. See also :ref:`draw_polygon()`. If ``width`` is negative, it will be ignored and the polyline will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1115,7 +1115,7 @@ If ``width`` is negative, it will be ignored and the polyline will be drawn usin |void| **draw_primitive**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array`, texture\: :ref:`Texture2D` = null\ ) :ref:`🔗` -Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also :ref:`draw_line()`, :ref:`draw_polyline()`, :ref:`draw_polygon()`, and :ref:`draw_rect()`. +Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. The ``points`` array is defined in local space. See also :ref:`draw_line()`, :ref:`draw_polyline()`, :ref:`draw_polygon()`, and :ref:`draw_rect()`. .. rst-class:: classref-item-separator @@ -1127,7 +1127,7 @@ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for |void| **draw_rect**\ (\ rect\: :ref:`Rect2`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` -Draws a rectangle. If ``filled`` is ``true``, the rectangle will be filled with the ``color`` specified. If ``filled`` is ``false``, the rectangle will be drawn as a stroke with the ``color`` and ``width`` specified. See also :ref:`draw_texture_rect()`. +Draws a rectangle. If ``filled`` is ``true``, the rectangle will be filled with the ``color`` specified. If ``filled`` is ``false``, the rectangle will be drawn as a stroke with the ``color`` and ``width`` specified. The ``rect`` is specified in local space. See also :ref:`draw_texture_rect()`. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1147,7 +1147,7 @@ If ``antialiased`` is ``true``, half transparent "feathers" will be attached to |void| **draw_set_transform**\ (\ position\: :ref:`Vector2`, rotation\: :ref:`float` = 0.0, scale\: :ref:`Vector2` = Vector2(1, 1)\ ) :ref:`🔗` -Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. +Sets a custom local transform for drawing via components. Anything drawn afterwards will be transformed by this. \ **Note:** :ref:`FontFile.oversampling` does *not* take ``scale`` into account. This means that scaling up/down will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated. To ensure text remains crisp regardless of scale, you can enable MSDF font rendering by enabling :ref:`ProjectSettings.gui/theme/default_font_multichannel_signed_distance_field` (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, :ref:`SystemFont.multichannel_signed_distance_field` can be enabled in the inspector. @@ -1161,7 +1161,7 @@ Sets a custom transform for drawing via components. Anything drawn afterwards wi |void| **draw_set_transform_matrix**\ (\ xform\: :ref:`Transform2D`\ ) :ref:`🔗` -Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this. +Sets a custom local transform for drawing via matrix. Anything drawn afterwards will be transformed by this. .. rst-class:: classref-item-separator @@ -1173,7 +1173,7 @@ Sets a custom transform for drawing via matrix. Anything drawn afterwards will b |void| **draw_string**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`🔗` -Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. +Draws ``text`` using the specified ``font`` at the ``pos`` in local space (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. \ **Example:** Draw "Hello world", using the project's default font: @@ -1212,7 +1212,7 @@ See also :ref:`Font.draw_string()`. |void| **draw_string_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`🔗` -Draws ``text`` outline using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. +Draws ``text`` outline using the specified ``font`` at the ``pos`` in local space (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. .. rst-class:: classref-item-separator @@ -1224,7 +1224,7 @@ Draws ``text`` outline using the specified ``font`` at the ``pos`` (bottom-left |void| **draw_style_box**\ (\ style_box\: :ref:`StyleBox`, rect\: :ref:`Rect2`\ ) :ref:`🔗` -Draws a styled rectangle. +Draws a styled rectangle. The ``rect`` is defined in local space. .. rst-class:: classref-item-separator @@ -1236,7 +1236,7 @@ Draws a styled rectangle. |void| **draw_texture**\ (\ texture\: :ref:`Texture2D`, position\: :ref:`Vector2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`🔗` -Draws a texture at a given position. +Draws a texture at a given position. The ``position`` is defined in local space. .. rst-class:: classref-item-separator @@ -1248,7 +1248,7 @@ Draws a texture at a given position. |void| **draw_texture_rect**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, tile\: :ref:`bool`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false\ ) :ref:`🔗` -Draws a textured rectangle at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_rect()` and :ref:`draw_texture_rect_region()`. +Draws a textured rectangle at a given position, optionally modulated by a color. The ``rect`` is defined in local space. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_rect()` and :ref:`draw_texture_rect_region()`. .. rst-class:: classref-item-separator @@ -1260,7 +1260,7 @@ Draws a textured rectangle at a given position, optionally modulated by a color. |void| **draw_texture_rect_region**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false, clip_uv\: :ref:`bool` = true\ ) :ref:`🔗` -Draws a textured rectangle from a texture's region (specified by ``src_rect``) at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_texture_rect()`. +Draws a textured rectangle from a texture's region (specified by ``src_rect``) at a given position in local space, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_texture_rect()`. .. rst-class:: classref-item-separator diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index 412040179..2f69588eb 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -448,7 +448,7 @@ If a user's browser or device doesn't support one of the given features, initial This doesn't have any effect on the interface when already initialized. -Possible values come from `WebXR's XRReferenceSpaceType `__, or include other features like ``"hand-tracking"`` to enable hand tracking. +See the MDN documentation on `WebXR's session features `__ for a list of possible values. .. rst-class:: classref-item-separator @@ -512,7 +512,7 @@ If a user's browser or device doesn't support one of the given features, initial This doesn't have any effect on the interface when already initialized. -Possible values come from `WebXR's XRReferenceSpaceType `__, or include other features like ``"hand-tracking"`` to enable hand tracking. +See the MDN documentation on `WebXR's session features `__ for a list of possible values. .. rst-class:: classref-item-separator