Added convenience function to build a Point from a Pointf that is scaled.

This commit is contained in:
Joseph Lenox 2018-05-06 20:37:18 -05:00
parent 9cbc2810b4
commit 00fd19331e
2 changed files with 8 additions and 0 deletions

View File

@ -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
{

View File

@ -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;