mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 10:11:10 -06:00
Code refactoring for 69731b1d => nsvgParseFromFileWithReplace() is extracted from nanosvg.h to BitmapCache
This commit is contained in:
parent
244b66649c
commit
21c8f373ff
4 changed files with 50 additions and 23 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include "GUI.hpp"
|
||||
#include "I18N.hpp"
|
||||
#include "Search.hpp"
|
||||
#include "BitmapCache.hpp"
|
||||
|
||||
#include "../Utils/MacDarkMode.hpp"
|
||||
#include "nanosvg/nanosvg.h"
|
||||
|
|
@ -1030,7 +1031,7 @@ std::vector<unsigned char> ImGuiWrapper::load_svg(const std::string& bitmap_name
|
|||
{
|
||||
std::vector<unsigned char> empty_vector;
|
||||
|
||||
NSVGimage* image = ::nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, { { "#808080", "#FFFFFF" } });
|
||||
NSVGimage* image = BitmapCache::nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, { { "\"#808080\"", "\"#FFFFFF\"" } });
|
||||
if (image == nullptr)
|
||||
return empty_vector;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue