MCPcopy Create free account
hub / github.com/MapServer/MapServer / end_contour

Method end_contour

renderers/agg/include/agg_conv_gpc.h:248–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246 //------------------------------------------------------------------------
247 template<class VSA, class VSB>
248 void conv_gpc<VSA, VSB>::end_contour(unsigned orientation)
249 {
250 if(m_contour_accumulator.size())
251 {
252 if(m_vertex_accumulator.size() > 2)
253 {
254 contour_header_type& h =
255 m_contour_accumulator[m_contour_accumulator.size() - 1];
256
257 h.num_vertices = m_vertex_accumulator.size();
258 h.hole_flag = 0;
259
260 // TO DO: Clarify the "holes"
261 //if(is_cw(orientation)) h.hole_flag = 1;
262
263 h.vertices = pod_allocator<gpc_vertex>::allocate(h.num_vertices);
264 gpc_vertex* d = h.vertices;
265 int i;
266 for(i = 0; i < h.num_vertices; i++)
267 {
268 const gpc_vertex& s = m_vertex_accumulator[i];
269 d->x = s.x;
270 d->y = s.y;
271 ++d;
272 }
273 }
274 else
275 {
276 m_vertex_accumulator.remove_last();
277 }
278 }
279 }
280
281
282 //------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

remove_lastMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected