David Nehme
David Nehme

Reputation: 21572

flipping a polygon with boost:geometry

What is the recommended way to flip a polygon horizontally so that its bounding box remains constant?

Upvotes: 1

Views: 399

Answers (1)

Barend Gehrels
Barend Gehrels

Reputation: 1057

Either you can use boost::geometry::for_each_point, supplying a functor which calculates the flipped coordinates (using e.g. an x-coordinate member variable calculated before using boost::geometry::envelope).

Or you can use boost::geometry::transform using a matrix transformer

Either way should work, there is no recommended way

Upvotes: 1

Related Questions