nanovg icon indicating copy to clipboard operation
nanovg copied to clipboard

NVGpaints functions are context-dependent

Open nasso opened this issue 9 years ago • 2 comments

Why does nvgLinearGradient need the NVGcontext to create a NVGpaint and nvgRGB(A)(f) doesn't?

In the code, the context isn't used in the creation of the structures. Can't we remove the ctx argument from those functions?

nasso avatar Jun 09 '16 20:06 nasso

I think it was chosen for API consistency.

memononen avatar Jun 10 '16 07:06 memononen

Oh I see. Thank you anyway, I can still pass NULL as ctx, it works well. But then it's the same problem with fonts...

But it doesn't matter, I found a solution to my problem !

nasso avatar Jun 10 '16 14:06 nasso