mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-06 05:56:37 +08:00
It's all integer points anyway.
This commit is contained in:
parent
561cbe7145
commit
dccc04bd8a
@ -251,8 +251,8 @@ void Plate2D::update_bed_size() {
|
||||
|
||||
this->scaling_factor = std::min(static_cast<double>(canvas_w) / unscale(size.x), static_cast<double>(canvas_h) / unscale(size.y));
|
||||
this->bed_origin = wxPoint(
|
||||
canvas_w / 2.0 - (unscale(bb.max.x + bb.min.x)/2.0 * this->scaling_factor),
|
||||
canvas_h - (canvas_h / 2.0 - (unscale(bb.max.y + bb.min.y)/2.0 * this->scaling_factor))
|
||||
canvas_w / 2 - (unscale(bb.max.x + bb.min.x)/2 * this->scaling_factor),
|
||||
canvas_h - (canvas_h / 2 - (unscale(bb.max.y + bb.min.y)/2 * this->scaling_factor))
|
||||
);
|
||||
|
||||
const auto& center = bb.center();
|
||||
|
@ -84,8 +84,10 @@ private:
|
||||
wxPoint unscaled_point_to_pixel(const wxPoint& in);
|
||||
|
||||
|
||||
/// Displacement needed to center bed.
|
||||
wxPoint bed_origin {};
|
||||
|
||||
/// private class variables to stash bits for drawing the print bed area.
|
||||
wxRealPoint bed_origin {};
|
||||
wxRealPoint print_center {};
|
||||
Slic3r::Polygon bed_polygon {};
|
||||
std::vector<wxPoint> grid {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user