From 14a22f1b2500f15e548f79a972be2c9b5b086bd5 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 29 Sep 2021 09:43:45 -0400 Subject: [PATCH] Make nvgGlobalAlpha() only set tint alpha, rather than resetting tint to white with the given alpha. --- src/nanovg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nanovg.c b/src/nanovg.c index e2402ee..70813f7 100644 --- a/src/nanovg.c +++ b/src/nanovg.c @@ -721,7 +721,8 @@ void nvgLineJoin(NVGcontext* ctx, int join) void nvgGlobalAlpha(NVGcontext* ctx, float alpha) { - nvgGlobalTint(ctx, nvgRGBAf(1, 1, 1, alpha)); + NVGstate* state = nvg__getState(ctx); + state->tint.a = alpha; } void nvgGlobalTint(NVGcontext* ctx, NVGcolor tint)