Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2022-06-08 14:12:29 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2022-06-08 14:12:29 +0300
commitb42e4b29272762b925e78c19fb5b0fd834eecf61 (patch)
tree6613a1d0bce5abb826212a3e71801eccce44bd1d
parentf11f216f919b383bd0d5ca800150bd138b97ae5b (diff)
GLTexture - Use BitmapCache::nsvgParseFromFileWithReplace() in place of nsvgParseFromFile() to load images from files
-rw-r--r--src/slic3r/GUI/GLTexture.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/slic3r/GUI/GLTexture.cpp b/src/slic3r/GUI/GLTexture.cpp
index 137a0a109..6065f22a5 100644
--- a/src/slic3r/GUI/GLTexture.cpp
+++ b/src/slic3r/GUI/GLTexture.cpp
@@ -7,6 +7,7 @@
#include "GUI_App.hpp"
#include "GLModel.hpp"
#endif // ENABLE_LEGACY_OPENGL_REMOVAL
+#include "BitmapCache.hpp"
#include <GL/glew.h>
@@ -204,7 +205,7 @@ bool GLTexture::load_from_svg_files_as_sprites_array(const std::vector<std::stri
if (!boost::algorithm::iends_with(filename, ".svg"))
continue;
- NSVGimage* image = nsvgParseFromFile(filename.c_str(), "px", 96.0f);
+ NSVGimage* image = BitmapCache::nsvgParseFromFileWithReplace(filename.c_str(), "px", 96.0f, {});
if (image == nullptr)
continue;
@@ -536,7 +537,7 @@ bool GLTexture::load_from_svg(const std::string& filename, bool use_mipmaps, boo
{
bool compression_enabled = compress && GLEW_EXT_texture_compression_s3tc;
- NSVGimage* image = nsvgParseFromFile(filename.c_str(), "px", 96.0f);
+ NSVGimage* image = BitmapCache::nsvgParseFromFileWithReplace(filename.c_str(), "px", 96.0f, {});
if (image == nullptr) {
reset();
return false;