diff --git a/example/demo.c b/example/demo.c index 8bd8746..132f7db 100644 --- a/example/demo.c +++ b/example/demo.c @@ -750,7 +750,7 @@ void renderDemo(struct NVGcontext* vg, float mx, float my, float width, float he nvgSave(vg); if (blowup) { -// nvgRotate(vg, 3.0f/180.0f*NVG_PI); + nvgRotate(vg, sinf(t*0.3f)*5.0f/180.0f*NVG_PI); nvgScale(vg, 2.0f, 2.0f); } diff --git a/src/nanovg.c b/src/nanovg.c index 9453404..539941d 100644 --- a/src/nanovg.c +++ b/src/nanovg.c @@ -1572,7 +1572,7 @@ void nvgFontFace(struct NVGcontext* ctx, const char* font) static float nvg__quantize(float a, float d) { - return ((int)(a / d)) * d; + return ((int)(a / d + 0.5f)) * d; } float nvgText(struct NVGcontext* ctx, float x, float y, const char* string, const char* end)