mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-04 22:50:44 +08:00
Added convenience function to build a Point from a Pointf that is scaled.
This commit is contained in:
parent
9cbc2810b4
commit
00fd19331e
@ -18,6 +18,11 @@ Point::operator==(const Point& rhs) const
|
||||
return this->coincides_with(rhs);
|
||||
}
|
||||
|
||||
Point
|
||||
Point::new_scale(Pointf p) {
|
||||
return Point(scale_(p.x), scale_(p.y));
|
||||
}
|
||||
|
||||
std::string
|
||||
Point::wkt() const
|
||||
{
|
||||
|
@ -36,6 +36,9 @@ class Point
|
||||
static Point new_scale(coordf_t x, coordf_t y) {
|
||||
return Point(scale_(x), scale_(y));
|
||||
};
|
||||
|
||||
/// Scale and create a Point from a Pointf.
|
||||
static Point new_scale(Pointf p);
|
||||
bool operator==(const Point& rhs) const;
|
||||
std::string wkt() const;
|
||||
std::string dump_perl() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user