1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>model::polygon</title> 5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../index.html" title="Chapter 1. Geometry"> 8<link rel="up" href="../models.html" title="Models"> 9<link rel="prev" href="model_linestring.html" title="model::linestring"> 10<link rel="next" href="model_multi_point.html" title="model::multi_point"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="model_linestring.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../models.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="model_multi_point.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h4 class="title"> 27<a name="geometry.reference.models.model_polygon"></a><a class="link" href="model_polygon.html" title="model::polygon">model::polygon</a> 28</h4></div></div></div> 29<p> 30 <a class="indexterm" name="idm45635679971248"></a><a class="indexterm" name="idm45635679970560"></a> 31The polygon contains an outer ring and zero or more inner rings. 32 </p> 33<h6> 34<a name="geometry.reference.models.model_polygon.h0"></a> 35 <span class="phrase"><a name="geometry.reference.models.model_polygon.model_of"></a></span><a class="link" href="model_polygon.html#geometry.reference.models.model_polygon.model_of">Model 36 of</a> 37 </h6> 38<p> 39 <a class="link" href="../concepts/concept_polygon.html" title="Polygon Concept">Polygon Concept</a> 40 </p> 41<h6> 42<a name="geometry.reference.models.model_polygon.h1"></a> 43 <span class="phrase"><a name="geometry.reference.models.model_polygon.synopsis"></a></span><a class="link" href="model_polygon.html#geometry.reference.models.model_polygon.synopsis">Synopsis</a> 44 </h6> 45<p> 46</p> 47<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Point</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">ClockWise</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">Closed</span><span class="special">,</span> <span class="keyword">template</span><span class="special"><</span> <span class="keyword">typename</span><span class="special">,</span> <span class="keyword">typename</span> <span class="special">></span> <span class="keyword">class</span> <span class="identifier">PointList</span><span class="special">,</span> 48 <span class="keyword">template</span><span class="special"><</span> <span class="keyword">typename</span><span class="special">,</span> <span class="keyword">typename</span> <span class="special">></span> <span class="keyword">class</span> <span class="identifier">RingList</span><span class="special">,</span> <span class="keyword">template</span><span class="special"><</span> <span class="keyword">typename</span> <span class="special">></span> <span class="keyword">class</span> <span class="identifier">PointAlloc</span><span class="special">,</span> <span class="keyword">template</span><span class="special"><</span> <span class="keyword">typename</span> <span class="special">></span> <span class="keyword">class</span> <span class="identifier">RingAlloc</span><span class="special">></span> 49<span class="keyword">class</span> <span class="identifier">model</span><span class="special">::</span><span class="identifier">polygon</span> 50<span class="special">{</span> 51 <span class="comment">// ...</span> 52<span class="special">};</span> 53</pre> 54<p> 55 </p> 56<h6> 57<a name="geometry.reference.models.model_polygon.h2"></a> 58 <span class="phrase"><a name="geometry.reference.models.model_polygon.template_parameter_s_"></a></span><a class="link" href="model_polygon.html#geometry.reference.models.model_polygon.template_parameter_s_">Template 59 parameter(s)</a> 60 </h6> 61<div class="informaltable"><table class="table"> 62<colgroup> 63<col> 64<col> 65<col> 66</colgroup> 67<thead><tr> 68<th> 69 <p> 70 Parameter 71 </p> 72 </th> 73<th> 74 <p> 75 Default 76 </p> 77 </th> 78<th> 79 <p> 80 Description 81 </p> 82 </th> 83</tr></thead> 84<tbody> 85<tr> 86<td> 87 <p> 88 typename Point 89 </p> 90 </td> 91<td> 92 </td> 93<td> 94 <p> 95 point type 96 </p> 97 </td> 98</tr> 99<tr> 100<td> 101 <p> 102 bool ClockWise 103 </p> 104 </td> 105<td> 106 <p> 107 true 108 </p> 109 </td> 110<td> 111 <p> 112 true for clockwise direction, false for CounterClockWise direction 113 </p> 114 </td> 115</tr> 116<tr> 117<td> 118 <p> 119 bool Closed 120 </p> 121 </td> 122<td> 123 <p> 124 true 125 </p> 126 </td> 127<td> 128 <p> 129 true for closed polygons (last point == first point), false open 130 points 131 </p> 132 </td> 133</tr> 134<tr> 135<td> 136 <p> 137 template< typename, typename > class PointList 138 </p> 139 </td> 140<td> 141 <p> 142 std::vector 143 </p> 144 </td> 145<td> 146 <p> 147 container type for points, for example std::vector, std::deque 148 </p> 149 </td> 150</tr> 151<tr> 152<td> 153 <p> 154 template< typename, typename > class RingList 155 </p> 156 </td> 157<td> 158 <p> 159 std::vector 160 </p> 161 </td> 162<td> 163 <p> 164 container type for inner rings, for example std::vector, std::deque 165 </p> 166 </td> 167</tr> 168<tr> 169<td> 170 <p> 171 template< typename > class PointAlloc 172 </p> 173 </td> 174<td> 175 <p> 176 std::allocator 177 </p> 178 </td> 179<td> 180 <p> 181 container-allocator-type, for the points 182 </p> 183 </td> 184</tr> 185<tr> 186<td> 187 <p> 188 template< typename > class RingAlloc 189 </p> 190 </td> 191<td> 192 <p> 193 std::allocator 194 </p> 195 </td> 196<td> 197 <p> 198 container-allocator-type, for the rings 199 </p> 200 </td> 201</tr> 202</tbody> 203</table></div> 204<h6> 205<a name="geometry.reference.models.model_polygon.h3"></a> 206 <span class="phrase"><a name="geometry.reference.models.model_polygon.constructor_s_"></a></span><a class="link" href="model_polygon.html#geometry.reference.models.model_polygon.constructor_s_">Constructor(s)</a> 207 </h6> 208<div class="informaltable"><table class="table"> 209<colgroup> 210<col> 211<col> 212<col> 213</colgroup> 214<thead><tr> 215<th> 216 <p> 217 Function 218 </p> 219 </th> 220<th> 221 <p> 222 Description 223 </p> 224 </th> 225<th> 226 <p> 227 Parameters 228 </p> 229 </th> 230</tr></thead> 231<tbody> 232<tr> 233<td> 234 <p> 235</p> 236<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">polygon</span><span class="special">()</span></pre> 237<p> 238 </p> 239 </td> 240<td> 241 <p> 242 Default constructor, creating an empty polygon. 243 </p> 244 </td> 245<td> 246 </td> 247</tr> 248<tr> 249<td> 250 <p> 251</p> 252<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">polygon</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special"><</span> <span class="identifier">ring_type</span> <span class="special">></span> <span class="identifier">l</span><span class="special">)</span></pre> 253<p> 254 </p> 255 </td> 256<td> 257 <p> 258 Constructor taking std::initializer_list, filling the polygon. 259 </p> 260 </td> 261<td> 262 <p> 263 <span class="bold"><strong>std::initializer_list< ring_type ></strong></span>: 264 <span class="emphasis"><em>l</em></span>: 265 </p> 266 </td> 267</tr> 268</tbody> 269</table></div> 270<h6> 271<a name="geometry.reference.models.model_polygon.h4"></a> 272 <span class="phrase"><a name="geometry.reference.models.model_polygon.member_function_s_"></a></span><a class="link" href="model_polygon.html#geometry.reference.models.model_polygon.member_function_s_">Member 273 Function(s)</a> 274 </h6> 275<div class="informaltable"><table class="table"> 276<colgroup> 277<col> 278<col> 279<col> 280<col> 281</colgroup> 282<thead><tr> 283<th> 284 <p> 285 Function 286 </p> 287 </th> 288<th> 289 <p> 290 Description 291 </p> 292 </th> 293<th> 294 <p> 295 Parameters 296 </p> 297 </th> 298<th> 299 <p> 300 Returns 301 </p> 302 </th> 303</tr></thead> 304<tbody> 305<tr> 306<td> 307 <p> 308</p> 309<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">ring_type</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">outer</span><span class="special">()</span></pre> 310<p> 311 </p> 312 </td> 313<td> 314 </td> 315<td> 316 </td> 317<td> 318 </td> 319</tr> 320<tr> 321<td> 322 <p> 323</p> 324<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">inner_container_type</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">inners</span><span class="special">()</span></pre> 325<p> 326 </p> 327 </td> 328<td> 329 </td> 330<td> 331 </td> 332<td> 333 </td> 334</tr> 335<tr> 336<td> 337 <p> 338</p> 339<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">ring_type</span> <span class="special">&</span> <span class="identifier">outer</span><span class="special">()</span></pre> 340<p> 341 </p> 342 </td> 343<td> 344 </td> 345<td> 346 </td> 347<td> 348 </td> 349</tr> 350<tr> 351<td> 352 <p> 353</p> 354<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">inner_container_type</span> <span class="special">&</span> <span class="identifier">inners</span><span class="special">()</span></pre> 355<p> 356 </p> 357 </td> 358<td> 359 </td> 360<td> 361 </td> 362<td> 363 </td> 364</tr> 365<tr> 366<td> 367 <p> 368</p> 369<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">void</span> <span class="identifier">clear</span><span class="special">()</span></pre> 370<p> 371 </p> 372 </td> 373<td> 374 <p> 375 Utility method, clears outer and inner rings. 376 </p> 377 </td> 378<td> 379 </td> 380<td> 381 </td> 382</tr> 383</tbody> 384</table></div> 385<h6> 386<a name="geometry.reference.models.model_polygon.h5"></a> 387 <span class="phrase"><a name="geometry.reference.models.model_polygon.header"></a></span><a class="link" href="model_polygon.html#geometry.reference.models.model_polygon.header">Header</a> 388 </h6> 389<p> 390 Either 391 </p> 392<p> 393 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> 394 </p> 395<p> 396 Or 397 </p> 398<p> 399 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">polygon</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> 400 </p> 401<h6> 402<a name="geometry.reference.models.model_polygon.h6"></a> 403 <span class="phrase"><a name="geometry.reference.models.model_polygon.examples"></a></span><a class="link" href="model_polygon.html#geometry.reference.models.model_polygon.examples">Examples</a> 404 </h6> 405<p> 406 Declaration and use of the Boost.Geometry model::polygon, modelling the 407 Polygon Concept 408 </p> 409<p> 410</p> 411<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span> 412<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 413<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 414 415<span class="keyword">namespace</span> <span class="identifier">bg</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">;</span> 416 417<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> 418<span class="special">{</span> 419 <span class="keyword">typedef</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">point</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">cs</span><span class="special">::</span><span class="identifier">cartesian</span><span class="special">></span> <span class="identifier">point_t</span><span class="special">;</span> 420 <span class="keyword">typedef</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">polygon</span><span class="special"><</span><span class="identifier">point_t</span><span class="special">></span> <span class="identifier">polygon_t</span><span class="special">;</span> <a class="co" name="geometry.reference.models.model_polygon.c0" href="model_polygon.html#geometry.reference.models.model_polygon.c1"><img src="../../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a> 421 422 <span class="identifier">polygon_t</span> <span class="identifier">poly1</span><span class="special">;</span> <a class="co" name="geometry.reference.models.model_polygon.c2" href="model_polygon.html#geometry.reference.models.model_polygon.c3"><img src="../../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a> 423 424<span class="preprocessor">#if</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX</span><span class="special">)</span> <span class="special">\</span> 425 <span class="special">&&</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_NO_CXX11_HDR_INITIALIZER_LIST</span><span class="special">)</span> 426 427 <span class="identifier">polygon_t</span> <span class="identifier">polygon2</span><span class="special">{{{</span><span class="number">0.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">},</span> <span class="special">{</span><span class="number">0.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">},</span> <span class="special">{</span><span class="number">5.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">},</span> <span class="special">{</span><span class="number">5.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">},</span> <span class="special">{</span><span class="number">0.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">}},</span> 428 <span class="special">{{</span><span class="number">1.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">},</span> <span class="special">{</span><span class="number">4.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">},</span> <span class="special">{</span><span class="number">4.0</span><span class="special">,</span> <span class="number">4.0</span><span class="special">},</span> <span class="special">{</span><span class="number">1.0</span><span class="special">,</span> <span class="number">4.0</span><span class="special">},</span> <span class="special">{</span><span class="number">1.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">}}};</span> <a class="co" name="geometry.reference.models.model_polygon.c4" href="model_polygon.html#geometry.reference.models.model_polygon.c5"><img src="../../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a> 429 430<span class="preprocessor">#endif</span> 431 432 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">0.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">));</span> <a class="co" name="geometry.reference.models.model_polygon.c6" href="model_polygon.html#geometry.reference.models.model_polygon.c7"><img src="../../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a> 433 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">0.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">));</span> 434 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">5.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">));</span> 435 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">5.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">));</span> 436 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">0.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">));</span> 437 438 <span class="identifier">poly1</span><span class="special">.</span><span class="identifier">inners</span><span class="special">().</span><span class="identifier">resize</span><span class="special">(</span><span class="number">1</span><span class="special">);</span> <a class="co" name="geometry.reference.models.model_polygon.c8" href="model_polygon.html#geometry.reference.models.model_polygon.c9"><img src="../../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a> 439 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">));</span> <a class="co" name="geometry.reference.models.model_polygon.c10" href="model_polygon.html#geometry.reference.models.model_polygon.c11"><img src="../../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a> 440 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">4.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">));</span> 441 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">4.0</span><span class="special">,</span> <span class="number">4.0</span><span class="special">));</span> 442 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span> <span class="number">4.0</span><span class="special">));</span> 443 <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">.</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">));</span> 444 445 <span class="keyword">double</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">area</span><span class="special">(</span><span class="identifier">poly1</span><span class="special">);</span> 446 447 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 448 449 <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span> 450<span class="special">}</span> 451</pre> 452<p> 453 </p> 454<div class="calloutlist"><table border="0" summary="Callout list"> 455<tr> 456<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_polygon.c1"></a><a href="#geometry.reference.models.model_polygon.c0"><img src="../../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a> </p></td> 457<td valign="top" align="left"><p> 458 Default parameters, clockwise, closed polygon. 459 </p></td> 460</tr> 461<tr> 462<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_polygon.c3"></a><a href="#geometry.reference.models.model_polygon.c2"><img src="../../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a> </p></td> 463<td valign="top" align="left"><p> 464 Default-construct a polygon. 465 </p></td> 466</tr> 467<tr> 468<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_polygon.c5"></a><a href="#geometry.reference.models.model_polygon.c4"><img src="../../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a> </p></td> 469<td valign="top" align="left"><p> 470 Construct a polygon containing an exterior and interior ring, using 471 C++11 unified initialization syntax. 472 </p></td> 473</tr> 474<tr> 475<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_polygon.c7"></a><a href="#geometry.reference.models.model_polygon.c6"><img src="../../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a> </p></td> 476<td valign="top" align="left"><p> 477 Append point to the exterior ring. 478 </p></td> 479</tr> 480<tr> 481<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_polygon.c9"></a><a href="#geometry.reference.models.model_polygon.c8"><img src="../../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a> </p></td> 482<td valign="top" align="left"><p> 483 Resize a container of interior rings. 484 </p></td> 485</tr> 486<tr> 487<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_polygon.c11"></a><a href="#geometry.reference.models.model_polygon.c10"><img src="../../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a> </p></td> 488<td valign="top" align="left"><p> 489 Append point to the interior ring. 490 </p></td> 491</tr> 492</table></div> 493<p> 494 Output: 495 </p> 496<pre class="programlisting">16 497</pre> 498</div> 499<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 500<td align="left"></td> 501<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam 502 Wulkiewicz, Oracle and/or its affiliates<p> 503 Distributed under the Boost Software License, Version 1.0. (See accompanying 504 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 505 </p> 506</div></td> 507</tr></table> 508<hr> 509<div class="spirit-nav"> 510<a accesskey="p" href="model_linestring.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../models.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="model_multi_point.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 511</div> 512</body> 513</html> 514