Replace global oversampling with overrideable per-viewport oversampling.

This commit is contained in:
Pāvels Nadtočajevs
2025-03-30 14:20:25 +03:00
parent 215acd52e8
commit 4afeca3bcf
38 changed files with 1235 additions and 557 deletions

View File

@@ -42,8 +42,9 @@
<param index="0" name="canvas" type="RID" />
<param index="1" name="pos" type="Vector2" />
<param index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<param index="3" name="oversampling" type="float" default="0.0" />
<description>
Draw text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
Draw text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
</description>
</method>
<method name="draw_outline" qualifiers="const">
@@ -52,8 +53,9 @@
<param index="1" name="pos" type="Vector2" />
<param index="2" name="outline_size" type="int" default="1" />
<param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<param index="4" name="oversampling" type="float" default="0.0" />
<description>
Draw text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
Draw text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
</description>
</method>
<method name="get_inferred_direction" qualifiers="const">