-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Radial Gradient not working #612
Comments
I tried out your code and got this after I did one weird trick, that I am gonna share with you. Trick: I went into the nanovg demo and checked how it's supposed to be done by searching for |
And how do you suppose I got this (scroll down to find it). |
I am not clairvoyant and don't know what you did. But if you copy/paste the code from the demo and don't reorder it or leave crucial parts out, it will work. |
Well, that is all the rendering code I'm running per frame apart from calling nvgBeginFrame(vg) and nvgEndFrame(vg) - so it should work. (I have tried moving the rectangle about as well, the paint is definitely not there!) |
You're missing `nvgBeginPath(vg)` before the rect.
…On Tue, Mar 16, 2021 at 8:22 PM MatijaBrown ***@***.***> wrote:
The title says it all:
When running following code, no gradient appears inside the rectangle.
nvgRect(vg, 900, 100, 300, 500);
nvgFillPaint(vg, nvgRadialGradient(vg, 1050, 350, 100, 200, nvgRGBAf(1, 0, 0, 1), nvgRGBAf(1, 1, 0, 1)));
nvgFill(vg);
Is there a reason for this? Am I doing something wrong?
Anyway, have a good day.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#612>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIBXSFAS3KLWFDLZDSH5STTD6OUTANCNFSM4ZJCQE4Q>
.
|
Well thank you for the answer. I have no idea if I really did forget it, at least I can't remember, but the code is long gone now. |
The title says it all:
When running following code, no gradient appears inside the rectangle.
Is there a reason for this? Am I doing something wrong?
Anyway, have a good day.
The text was updated successfully, but these errors were encountered: