]> O.S.I.I.S - jp/vkvg.git/commitdiff
update nanosvg copyright
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 27 Aug 2020 11:44:51 +0000 (13:44 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 27 Aug 2020 11:44:51 +0000 (13:44 +0200)
src/nanosvg.h

index b2430a59778c2f119411da06903dfe7763c32fa9..5579449ffbc1225d311c87e5f8f5684c77ad291e 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013-14 Mikko Mononen memon@inside.org
+ * Copyright (c) 2019-20 Michael Tesch
  *
  * This software is provided 'as-is', without any express or implied
  * warranty.  In no event will the authors be held liable for any damages
@@ -26,6 +27,7 @@
  *
  */
 
+
 #ifndef NANOSVG_H
 #define NANOSVG_H
 
@@ -2958,32 +2960,32 @@ error:
 
 NSVGpath* nsvgDuplicatePath(NSVGpath* p)
 {
-    NSVGpath* res = NULL;
+       NSVGpath* res = NULL;
 
-    if (p == NULL)
-        return NULL;
+       if (p == NULL)
+               return NULL;
 
-    res = (NSVGpath*)malloc(sizeof(NSVGpath));
-    if (res == NULL) goto error;
-    memset(res, 0, sizeof(NSVGpath));
+       res = (NSVGpath*)malloc(sizeof(NSVGpath));
+       if (res == NULL) goto error;
+       memset(res, 0, sizeof(NSVGpath));
 
-    res->pts = (float*)malloc(p->npts*2*sizeof(float));
-    if (res->pts == NULL) goto error;
-    memcpy(res->pts, p->pts, p->npts * sizeof(float) * 2);
-    res->npts = p->npts;
+       res->pts = (float*)malloc(p->npts*2*sizeof(float));
+       if (res->pts == NULL) goto error;
+       memcpy(res->pts, p->pts, p->npts * sizeof(float) * 2);
+       res->npts = p->npts;
 
-    memcpy(res->bounds, p->bounds, sizeof(p->bounds));
+       memcpy(res->bounds, p->bounds, sizeof(p->bounds));
 
-    res->closed = p->closed;
+       res->closed = p->closed;
 
-    return res;
+       return res;
 
 error:
-    if (res != NULL) {
-        free(res->pts);
-        free(res);
-    }
-    return NULL;
+       if (res != NULL) {
+               free(res->pts);
+               free(res);
+       }
+       return NULL;
 }
 
 void nsvgDelete(NSVGimage* image)