Browse Source

Make nvgGlobalAlpha() only set tint alpha, rather than resetting tint to white with the given alpha.

master
Andrew Belt 3 years ago
parent
commit
14a22f1b25
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/nanovg.c

+ 2
- 1
src/nanovg.c View File

@@ -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)


Loading…
Cancel
Save