From abb978063fe45aeefe378cc5f6886ff8a52aa861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20R=C3=B6ver?= Date: Sat, 20 Mar 2021 18:57:44 +0100 Subject: [PATCH] put in some more consts --- src/nanosvgrast.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nanosvgrast.h b/src/nanosvgrast.h index b740c316..ed21bd56 100644 --- a/src/nanosvgrast.h +++ b/src/nanosvgrast.h @@ -59,7 +59,7 @@ NSVGrasterizer* nsvgCreateRasterizer(); // h - height of the image to render // stride - number of bytes per scaleline in the destination buffer void nsvgRasterize(NSVGrasterizer* r, - NSVGimage* image, float tx, float ty, float scale, + const NSVGimage* image, float tx, float ty, float scale, unsigned char* dst, int w, int h, int stride); // Deletes rasterizer context. @@ -368,10 +368,10 @@ static void nsvg__flattenCubicBez(NSVGrasterizer* r, nsvg__flattenCubicBez(r, x1234,y1234, x234,y234, x34,y34, x4,y4, level+1, type); } -static void nsvg__flattenShape(NSVGrasterizer* r, NSVGshape* shape, float scale) +static void nsvg__flattenShape(NSVGrasterizer* r, const NSVGshape* shape, float scale) { int i, j; - NSVGpath* path; + const NSVGpath* path; for (path = shape->paths; path != NULL; path = path->next) { r->npoints = 0; @@ -732,7 +732,7 @@ static void nsvg__prepareStroke(NSVGrasterizer* r, float miterLimit, int lineJoi } } -static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float scale) +static void nsvg__flattenShapeStroke(NSVGrasterizer* r, const NSVGshape* shape, float scale) { int i, j, closed; NSVGpath* path; @@ -1260,7 +1260,7 @@ static void nsvg__unpremultiplyAlpha(unsigned char* image, int w, int h, int str } -static void nsvg__initPaint(NSVGcachedPaint* cache, NSVGpaint* paint, float opacity) +static void nsvg__initPaint(NSVGcachedPaint* cache, const NSVGpaint* paint, float opacity) { int i, j; NSVGgradient* grad; @@ -1363,7 +1363,7 @@ static void dumpEdges(NSVGrasterizer* r, const char* name) */ void nsvgRasterize(NSVGrasterizer* r, - NSVGimage* image, float tx, float ty, float scale, + const NSVGimage* image, float tx, float ty, float scale, unsigned char* dst, int w, int h, int stride) { NSVGshape *shape = NULL;