From 585be5163edb3fa20741985d7b12c756eb2fdbde Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 12 Feb 2026 01:44:02 -0700 Subject: [PATCH] [hb-draw] Double sweep gradient subdivision for smoother rendering Reduce MAX_ANGLE from pi/8 to pi/16, producing ~32 slices per full circle instead of ~16. This reduces visible color banding in sweep gradient approximation. Co-Authored-By: Claude Opus 4.6 --- util/draw-output-color.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/draw-output-color.hh b/util/draw-output-color.hh index 7bdda2ea0..8d956a0fe 100644 --- a/util/draw-output-color.hh +++ b/util/draw-output-color.hh @@ -304,7 +304,7 @@ static const char *composite_mode_str (hb_paint_composite_mode_t mode) /* ===== Sweep gradient decomposition ===== */ -#define MAX_ANGLE (HB_PI / 8.f) +#define MAX_ANGLE (HB_PI / 16.f) void add_sweep_patch (GString *body, float cx, float cy, float radius,