From 7742da24b07b6fc073720cbad651f626b88bf7a5 Mon Sep 17 00:00:00 2001 From: Erick Fuentes Date: Tue, 22 Mar 2016 20:00:44 -0400 Subject: [PATCH] Fixed typo and added variable types --- src/nanosvg.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nanosvg.h b/src/nanosvg.h index 91dbdec..a6c6015 100644 --- a/src/nanosvg.h +++ b/src/nanosvg.h @@ -53,13 +53,13 @@ extern "C" { /* Example Usage: // Load - SNVGImage* image; + NSVGImage* image; image = nsvgParseFromFile("test.svg", "px", 96); printf("size: %f x %f\n", image->width, image->height); // Use... - for (shape = image->shapes; shape != NULL; shape = shape->next) { - for (path = shape->paths; path != NULL; path = path->next) { - for (i = 0; i < path->npts-1; i += 3) { + for (NSVGshape *shape = image->shapes; shape != NULL; shape = shape->next) { + for (NSVGpath *path = shape->paths; path != NULL; path = path->next) { + for (int i = 0; i < path->npts-1; i += 3) { float* p = &path->pts[i*2]; drawCubicBez(p[0],p[1], p[2],p[3], p[4],p[5], p[6],p[7]); }