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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2019-02-20 17:23:23 +0300
committerEnrico Turri <enricoturri@seznam.cz>2019-02-20 17:23:23 +0300
commit11fc849b1a92dddfab6b463e4b3a01825bd5692c (patch)
tree29f6647d1f591daaa253dae3f9c3fb5eda090f4d /src/slic3r/GUI/GLTexture.hpp
parent0b0457186b8fb8cfd8dc809c5c0d80e2409f7569 (diff)
Printbed textures generated from svg files
Diffstat (limited to 'src/slic3r/GUI/GLTexture.hpp')
-rw-r--r--src/slic3r/GUI/GLTexture.hpp20
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