mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +00:00
LibGfx: Fix antialiased circles becoming too pointy at small sizes
The issue mentioned in the previous FIXME also applied to circles, I just had not noticed. This is still not a prefect fix rather it just papers over it, but it now seems to render circles correctly.
This commit is contained in:
parent
52ee5026ea
commit
5fd3716e2f
Notes:
sideshowbarker
2024-07-17 10:27:11 +09:00
Author: https://github.com/MacDue
Commit: 5fd3716e2f
Pull-request: https://github.com/SerenityOS/serenity/pull/14193
Reviewed-by: https://github.com/linusg ✅
1 changed files with 4 additions and 7 deletions
|
@ -329,13 +329,10 @@ Gfx::AntiAliasingPainter::Range Gfx::AntiAliasingPainter::draw_ellipse_part(
|
||||||
auto correct = [&] {
|
auto correct = [&] {
|
||||||
int error = y - y_hat;
|
int error = y - y_hat;
|
||||||
|
|
||||||
if (!is_circle) {
|
// FIXME: The alpha values seem too low, which makes things look
|
||||||
// FIXME: For ellipses the alpha values seem too low, which
|
// overly pointy. This fixes that, though there's probably a better
|
||||||
// can make them look overly pointy. This fixes that, though there's
|
// solution to be found. (This issue seems to exist in the base algorithm)
|
||||||
// probably a better solution to be found.
|
error /= 4;
|
||||||
// (This issue seems to exist in the base algorithm)
|
|
||||||
error /= 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
delta2_y += error;
|
delta2_y += error;
|
||||||
delta_y += error;
|
delta_y += error;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue