summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-09-04 07:55:21 +0000
committerManolo Gouy <Manolo>2017-09-04 07:55:21 +0000
commit722faf50cf5d9b917b1d57b145c55ceed7c14b82 (patch)
tree2fb31d1952be1be26a8745e749e882bd910c087f /src
parent8f81b81beb4835753ede694c888486ca261c1ccf (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl_SVG_Image.cxx4
1 files changed, 3 insertions, 1 deletions
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 <FL/Fl_SVG_Image.H>
+#include <FL/fl_utf8.h>
#include <stdio.h>
#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;
}