37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
diff --git a/src/tools/aloadimage/nanosvg.h b/src/tools/aloadimage/nanosvg.h
|
|
index f5058b17..716adea5 100644
|
|
--- a/src/tools/aloadimage/nanosvg.h
|
|
+++ b/src/tools/aloadimage/nanosvg.h
|
|
@@ -163,7 +163,7 @@ typedef struct NSVGimage
|
|
} NSVGimage;
|
|
|
|
// Parses SVG file from a file, returns SVG image as paths.
|
|
-NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi);
|
|
+NSVGimage* nsvgParseFromFile(FILE* fp, const char* units, float dpi);
|
|
|
|
// Parses SVG file from a null terminated string, returns SVG image as paths.
|
|
// Important note: changes the string.
|
|
@@ -200,7 +200,6 @@ void nsvgDelete(NSVGimage* image);
|
|
#define NSVG_ALIGN_SLICE 2
|
|
|
|
#define NSVG_NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); } while(0)
|
|
-#define NSVG_RGB(r, g, b) (((unsigned int)r) | ((unsigned int)g << 8) | ((unsigned int)b << 16))
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma warning (disable: 4996) // Switch off security warnings
|
|
@@ -2930,14 +2929,12 @@ NSVGimage* nsvgParse(char* input, const char* units, float dpi)
|
|
return ret;
|
|
}
|
|
|
|
-NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi)
|
|
+NSVGimage* nsvgParseFromFile(FILE* fp, const char* units, float dpi)
|
|
{
|
|
- FILE* fp = NULL;
|
|
size_t size;
|
|
char* data = NULL;
|
|
NSVGimage* image = NULL;
|
|
|
|
- fp = fopen(filename, "rb");
|
|
if (!fp) goto error;
|
|
fseek(fp, 0, SEEK_END);
|
|
size = ftell(fp);
|