mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-04 11:20:38 +08:00
Avoid using wxString Printf, instead use Format() and use wxRealPoint (floating point) instead of wxPoint (integer)
This commit is contained in:
parent
904e7d749e
commit
b541bc208f
@ -76,11 +76,8 @@ void Plate2D::repaint(wxPaintEvent& e) {
|
||||
dc->SetTextForeground(wxColor(0,0,0));
|
||||
dc->SetFont(wxFont(10, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
|
||||
|
||||
wxString val {};
|
||||
val.Printf("X = %.0f", this->print_center.x);
|
||||
dc->DrawLabel(val , wxRect(0,0, center.x*2, this->GetSize().GetHeight()), wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM);
|
||||
val.Printf("Y = %.0f", this->print_center.y);
|
||||
dc->DrawRotatedText(val, 0, center.y + 15, 90);
|
||||
dc->DrawLabel(wxString::Format("X = %.0f", this->print_center.x), wxRect(0,0, center.x*2, this->GetSize().GetHeight()), wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM);
|
||||
dc->DrawRotatedText(wxString::Format("Y = %.0f", this->print_center.y), 0, center.y + 15, 90);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,8 +90,8 @@ private:
|
||||
void update_bed_size();
|
||||
|
||||
/// private class variables to stash bits for drawing the print bed area.
|
||||
wxPoint bed_origin {};
|
||||
wxPoint print_center {};
|
||||
wxRealPoint bed_origin {};
|
||||
wxRealPoint print_center {};
|
||||
Slic3r::Polygon bed_polygon {};
|
||||
std::vector<wxPoint> grid {};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user