What is the recommended way to flip a polygon horizontally so that its bounding box remains constant?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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