mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-10-04 21:16:33 +08:00
add std << operator to Point for evaulation in test environment
This commit is contained in:
parent
faeb213ce1
commit
72b0d2b763
@ -23,6 +23,12 @@ Point::new_scale(Pointf p) {
|
|||||||
return Point(scale_(p.x), scale_(p.y));
|
return Point(scale_(p.x), scale_(p.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::ostream&
|
||||||
|
operator<<(std::ostream &stm, const Point &point)
|
||||||
|
{
|
||||||
|
return stm << "POINT(" << point.x << " " << point.y << ")";
|
||||||
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
Point::wkt() const
|
Point::wkt() const
|
||||||
{
|
{
|
||||||
|
@ -85,6 +85,7 @@ class Point
|
|||||||
void align_to_grid(const Point &spacing, const Point &base = Point(0,0));
|
void align_to_grid(const Point &spacing, const Point &base = Point(0,0));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::ostream& operator<<(std::ostream &stm, const Point &point);
|
||||||
Point operator+(const Point& point1, const Point& point2);
|
Point operator+(const Point& point1, const Point& point2);
|
||||||
Point operator-(const Point& point1, const Point& point2);
|
Point operator-(const Point& point1, const Point& point2);
|
||||||
Point operator*(double scalar, const Point& point2);
|
Point operator*(double scalar, const Point& point2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user