diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-02-20 17:23:23 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-02-20 17:23:23 +0300 |
commit | 11fc849b1a92dddfab6b463e4b3a01825bd5692c (patch) | |
tree | 29f6647d1f591daaa253dae3f9c3fb5eda090f4d /src/slic3r/GUI/GLTexture.hpp | |
parent | 0b0457186b8fb8cfd8dc809c5c0d80e2409f7569 (diff) |
Printbed textures generated from svg files
Diffstat (limited to 'src/slic3r/GUI/GLTexture.hpp')
-rw-r--r-- | src/slic3r/GUI/GLTexture.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/slic3r/GUI/GLTexture.hpp b/src/slic3r/GUI/GLTexture.hpp index e027bd152..af41ac342 100644 --- a/src/slic3r/GUI/GLTexture.hpp +++ b/src/slic3r/GUI/GLTexture.hpp @@ -37,20 +37,28 @@ namespace GUI { GLTexture(); virtual ~GLTexture(); - bool load_from_file(const std::string& filename, bool generate_mipmaps); + bool load_from_file(const std::string& filename, bool use_mipmaps); +#if ENABLE_TEXTURES_FROM_SVG + bool load_from_svg_file(const std::string& filename, bool use_mipmaps, unsigned int max_size_px); +#endif // ENABLE_TEXTURES_FROM_SVG void reset(); - unsigned int get_id() const; - int get_width() const; - int get_height() const; + unsigned int get_id() const { return m_id; } + int get_width() const { return m_width; } + int get_height() const { return m_height; } - const std::string& get_source() const; + const std::string& get_source() const { return m_source; } static void render_texture(unsigned int tex_id, float left, float right, float bottom, float top); static void render_sub_texture(unsigned int tex_id, float left, float right, float bottom, float top, const Quad_UVs& uvs); protected: - unsigned int _generate_mipmaps(wxImage& image); + unsigned int generate_mipmaps(wxImage& image); +#if ENABLE_TEXTURES_FROM_SVG + private: + bool load_from_png(const std::string& filename, bool use_mipmaps); + bool load_from_svg(const std::string& filename, bool use_mipmaps, unsigned int max_size_px); +#endif // ENABLE_TEXTURES_FROM_SVG }; } // namespace GUI |