summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Giardi <david.giardi.eng@gmail.com>2023-04-16 14:15:53 +0200
committerDavid Giardi <david.giardi.eng@gmail.com>2023-04-17 20:23:03 +0200
commit2ef20045b1282369585c3395ff9f9ae418394817 (patch)
tree6c9d0a234a6afd03b5b143f0addd09cd8b5c6ec4 /doc
parenta7276f1ce0c2911216a2c4718efddab98ddffd8f (diff)
downloadredot-engine-2ef20045b1282369585c3395ff9f9ae418394817.tar.gz
Fix blurry borders on antialiased FlatStyleBox
This is a fix of the antialiasing logic of FlatStyleBox. It is now possible to have smooth rounded corners while keeping the edges sharp on the pixels. The antialiasing gradient positioning is ajusted so that the "hard" border corresponds to the middle of that gradient instead of one end. Checked against rendering of rounded rectangles in a vector graphics software.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/StyleBoxFlat.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 20b9da8ea6..d5ab282037 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -103,8 +103,9 @@
Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners or [member skew].
[b]Note:[/b] When using beveled corners with 45-degree angles ([member corner_detail] = 1), it is recommended to set [member anti_aliasing] to [code]false[/code] to ensure crisp visuals and avoid possible visual glitches.
</member>
- <member name="anti_aliasing_size" type="float" setter="set_aa_size" getter="get_aa_size" default="0.625">
- This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
+ <member name="anti_aliasing_size" type="float" setter="set_aa_size" getter="get_aa_size" default="1.0">
+ This changes the size of the antialiasing effect. [code]1.0[/code] is recommended for an optimal result at 100% scale, identical to how rounded rectangles are rendered in web browsers and most vector drawing software.
+ [b]Note:[/b] Higher values may produce a blur effect but can also create undesired artifacts on small boxes with large-radius corners.
</member>
<member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0.6, 0.6, 0.6, 1)">
The background color of the stylebox.