From 8f41a7bef7b6e1f906238239809c47ac37fd0573 Mon Sep 17 00:00:00 2001 From: Olli Wang Date: Mon, 26 Sep 2022 02:04:09 +0800 Subject: [PATCH] Allows setting the `NVG_MAX_STATES` number. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, `NVG_MAX_STATES` is set to 32. But it’s not enough sometimes in my case. This commit allows defining the preferred `NVG_MAX_STATES` number. --- src/nanovg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nanovg.c b/src/nanovg.c index 61826e8..4119d0d 100644 --- a/src/nanovg.c +++ b/src/nanovg.c @@ -45,7 +45,10 @@ #define NVG_INIT_POINTS_SIZE 128 #define NVG_INIT_PATHS_SIZE 16 #define NVG_INIT_VERTS_SIZE 256 + +#ifndef NVG_MAX_STATES #define NVG_MAX_STATES 32 +#endif #define NVG_KAPPA90 0.5522847493f // Length proportional to radius of a cubic bezier handle for 90deg arcs.