mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 10:11:10 -06:00
Implemented possibility to show resin colors from the Plater (Bottles with resin are colored now in preset combobox)
+ Added nsvgParseFromFileWithReplace() to replace some colors before parsing from SVG file + Thumbnails are saved with selected resin color in SL1 or SL1S files + "white" folder is deleted from "icons" now. THere is no needed anymore.
This commit is contained in:
parent
69731b1d96
commit
e8be7b2ecd
100 changed files with 109 additions and 2126 deletions
|
|
@ -1017,15 +1017,7 @@ std::vector<unsigned char> ImGuiWrapper::load_svg(const std::string& bitmap_name
|
|||
{
|
||||
std::vector<unsigned char> empty_vector;
|
||||
|
||||
#ifdef __WXMSW__
|
||||
std::string folder = "white\\";
|
||||
#else
|
||||
std::string folder = "white/";
|
||||
#endif
|
||||
if (!boost::filesystem::exists(Slic3r::var(folder + bitmap_name + ".svg")))
|
||||
folder.clear();
|
||||
|
||||
NSVGimage* image = ::nsvgParseFromFile(Slic3r::var(folder + bitmap_name + ".svg").c_str(), "px", 96.0f);
|
||||
NSVGimage* image = ::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