2018-04-20 10:58:07 +00:00
|
|
|
#ifndef slic3r_2DBed_hpp_
|
|
|
|
#define slic3r_2DBed_hpp_
|
|
|
|
|
2018-01-25 12:46:04 +00:00
|
|
|
#include <wx/wx.h>
|
2018-11-26 13:41:58 +00:00
|
|
|
#include "libslic3r/Config.hpp"
|
2018-01-25 12:46:04 +00:00
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
class Bed_2D : public wxPanel
|
|
|
|
{
|
2019-06-12 08:00:51 +00:00
|
|
|
static const int Border = 10;
|
|
|
|
|
2018-04-10 08:31:58 +00:00
|
|
|
bool m_user_drawn_background = true;
|
2018-01-25 12:46:04 +00:00
|
|
|
|
2019-06-12 08:00:51 +00:00
|
|
|
double m_scale_factor;
|
2018-08-21 19:05:24 +00:00
|
|
|
Vec2d m_shift = Vec2d::Zero();
|
|
|
|
Vec2d m_pos = Vec2d::Zero();
|
2018-01-25 12:46:04 +00:00
|
|
|
|
2019-07-18 09:12:11 +00:00
|
|
|
Point to_pixels(const Vec2d& point, int height);
|
|
|
|
void set_pos(const Vec2d& pos);
|
2018-01-30 11:10:12 +00:00
|
|
|
|
2018-01-25 12:46:04 +00:00
|
|
|
public:
|
2019-07-18 09:12:11 +00:00
|
|
|
explicit Bed_2D(wxWindow* parent);
|
2018-01-25 12:46:04 +00:00
|
|
|
|
2019-07-18 09:12:11 +00:00
|
|
|
void repaint(const std::vector<Vec2d>& shape);
|
2018-01-25 12:46:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // GUI
|
|
|
|
} // Slic3r
|
2018-04-20 10:58:07 +00:00
|
|
|
|
|
|
|
#endif /* slic3r_2DBed_hpp_ */
|