From 75f3ce618ec70e955829c17c131ed815f97ff7cd Mon Sep 17 00:00:00 2001 From: David Giardi Date: Sun, 16 Apr 2023 14:15:53 +0200 Subject: 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) --- doc/classes/StyleBoxFlat.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') 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. - - This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. + + 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. The background color of the stylebox. -- cgit v1.2.3