Code to load SVG icons into the BitmapCache class.

This commit is contained in:
bubnikv 2019-04-04 09:20:11 +02:00
parent 43ce5accc2
commit a36bdefda5
6 changed files with 113 additions and 36 deletions

View file

@ -11,15 +11,11 @@
#include <vector>
#include <algorithm>
#define NANOSVG_IMPLEMENTATION
#include "nanosvg/nanosvg.h"
#define NANOSVGRAST_IMPLEMENTATION
#include "nanosvg/nanosvgrast.h"
#include "libslic3r/Utils.hpp"
#include "libslic3r/Utils.hpp"
namespace Slic3r {
namespace GUI {
@ -378,6 +374,7 @@ bool GLTexture::load_from_svg(const std::string& filename, bool use_mipmaps, uns
if (n_pixels <= 0)
{
reset();
nsvgDelete(image);
return false;
}