diff options
author | David Giardi <david.giardi.eng@gmail.com> | 2023-04-16 14:15:53 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-04-24 17:08:55 +0200 |
commit | 75f3ce618ec70e955829c17c131ed815f97ff7cd (patch) | |
tree | a8fb67e806fd080582dfe80e06d963eaf9a69b81 /doc | |
parent | f39f3543134ade65b24ab2aed0abf1e356a0d3df (diff) |
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.
(cherry picked from commit 2ef20045b1282369585c3395ff9f9ae418394817)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/StyleBoxFlat.xml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 6bcc3c5ea6..87a5773f95 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. |