Boost logo

Geometry :

From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2020-06-19 08:22:00

On Fri, 19 Jun 2020 at 00:31, 0xtrzy_at_[hidden] via Geometry
<geometry_at_[hidden]> wrote:
> Hello,
> I have a multi polygon from union two shapes. I would like to draw multipolygon on screen.
> Therefore I need a shape to draw. If my polygon no have holes it is simple.
> But if it have one or more its trouble.
> How draw a shapes (list of points) from polygon?

Drawing is not a domain of the Boost.Geometry library.
The library gives you access to list of points of polygon rings
and you need to process it according to requirements of
drawing/rendering engine/API which you are using.

I believe I have presented how to access points of rings here

For testing and debugging purposes, the library offers limited support for
outputting geometries in SVG format which can be displayed in web browser.
Here is example how to use it:

If you want to implement drawing using a different engine/API,
then you can learn some details from the SVG code:

> P.S. What I can check clockwise of polygons in multipolygon? Simply i can check
> std::cout << " simple? " << (boost::geometry::is_simple(p) ? "yes" : "no") << std::endl;
> How checking each shape in Polygon?
> P.S.S. How set a clockwise one ring?

I believe we have answered these questions as part of our discussions here:

Best regards,

Mateusz Loskot,

Geometry list run by mateusz at