From 53950594758dcc805776b9d6b598bc239ac4ee19 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Wed, 6 Sep 2023 15:35:33 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20../src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp:?= =?UTF-8?q?888:57:=20error:=20no=20matching=20function=20for=20call=20to?= =?UTF-8?q?=20=E2=80=98draw=5Ffilled(Slic3r::ExPolygons&,=20std::array&,=20std::vector&,=20unsigne?= =?UTF-8?q?d=20int&,=20double&)=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp index 9b09b316f3..bf023a3cc2 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp @@ -31,6 +31,7 @@ #include #include // measure enumeration of fonts #include // save for svg +#include using namespace Slic3r; using namespace Slic3r::Emboss; @@ -754,7 +755,7 @@ void wu_draw_line(Linef line, /// Count of pixel on one line(size in data = N x data_width) /// Shape scale for conversion to pixels template // N .. count of channels per pixel -void draw_filled(const ExPolygons &shape, const std::array& color, std::vector &data, size_t data_width, double scale = 1.){ +void draw_filled(const ExPolygons &shape, const std::array& color, std::vector &data, size_t data_width, double scale){ assert(data.size() % N == 0); assert(data.size() % data_width == 0); assert((data.size() % (N*data_width)) == 0); @@ -885,7 +886,7 @@ bool init_texture(Texture &texture, const ExPolygonsWithIds& shapes_with_ids, un unsigned char alpha = 255; // without transparency std::array color{201, 201, 201, alpha}; - draw_filled(shape, color, data, texture.width, scale); + draw_filled<4>(shape, color, data, (size_t)texture.width, scale); // sends data to gpu glsafe(::glPixelStorei(GL_UNPACK_ALIGNMENT, 1));