From 722faf50cf5d9b917b1d57b145c55ceed7c14b82 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 4 Sep 2017 07:55:21 +0000 Subject: Class Fl_SVG_Image: use fl_fopen() to open files with non-ASCII characters in name. Also, have copy() copy the value of the image's proportional member variable. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12417 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_SVG_Image.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index b75b76047..036e67014 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -21,6 +21,7 @@ #if defined(FLTK_USE_NANOSVG) || defined(FL_DOXYGEN) #include +#include #include #define NANOSVG_ALL_COLOR_KEYWORDS // Include full list of color keywords. @@ -79,7 +80,7 @@ void Fl_SVG_Image::init_(const char *filename, char *filedata, Fl_SVG_Image *cop proportional = true; if (filename) { filedata = NULL; - FILE *fp = fopen(filename, "rb"); + FILE *fp = fl_fopen(filename, "rb"); if (fp) { fseek(fp, 0, SEEK_END); size_t size = ftell(fp); @@ -141,6 +142,7 @@ Fl_Image *Fl_SVG_Image::copy(int W, int H) { svg2->to_desaturate_ = to_desaturate_; svg2->average_weight_ = average_weight_; svg2->average_color_ = average_color_; + svg2->proportional = proportional; svg2->w(W); svg2->h(H); return svg2; } -- cgit v1.2.3