Browse Source

Add nvgGetGlobalTint().

shared-context
Andrew Belt 3 years ago
parent
commit
3974a8b856
2 changed files with 7 additions and 0 deletions
  1. +6
    -0
      src/nanovg.c
  2. +1
    -0
      src/nanovg.h

+ 6
- 0
src/nanovg.c View File

@@ -710,6 +710,12 @@ void nvgGlobalTint(NVGcontext* ctx, NVGcolor tint)
state->tint = tint;
}

NVGcolor nvgGetGlobalTint(NVGcontext* ctx)
{
NVGstate* state = nvg__getState(ctx);
return state->tint;
}

void nvgTransform(NVGcontext* ctx, float a, float b, float c, float d, float e, float f)
{
NVGstate* state = nvg__getState(ctx);


+ 1
- 0
src/nanovg.h View File

@@ -272,6 +272,7 @@ void nvgLineJoin(NVGcontext* ctx, int join);
// Already transparent paths will get proportionally more transparent as well.
void nvgGlobalAlpha(NVGcontext* ctx, float alpha);
void nvgGlobalTint(NVGcontext* ctx, NVGcolor tint);
NVGcolor nvgGetGlobalTint(NVGcontext* ctx);

//
// Transforms


Loading…
Cancel
Save