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

Method start_element

renderers/agg/src/agg_svg_parser.cpp:264–315  ·  view source on GitHub ↗

------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

262
263 //------------------------------------------------------------------------
264 void parser::start_element(void* data, const char* el, const char** attr)
265 {
266 parser& self = *(parser*)data;
267
268 if(strcmp(el, "title") == 0)
269 {
270 self.m_title_flag = true;
271 }
272 else
273 if(strcmp(el, "g") == 0)
274 {
275 self.m_path.push_attr();
276 self.parse_attr(attr);
277 }
278 else
279 if(strcmp(el, "path") == 0)
280 {
281 if(self.m_path_flag)
282 {
283 throw exception("start_element: Nested path");
284 }
285 self.m_path.begin_path();
286 self.parse_path(attr);
287 self.m_path.end_path();
288 self.m_path_flag = true;
289 }
290 else
291 if(strcmp(el, "rect") == 0)
292 {
293 self.parse_rect(attr);
294 }
295 else
296 if(strcmp(el, "line") == 0)
297 {
298 self.parse_line(attr);
299 }
300 else
301 if(strcmp(el, "polyline") == 0)
302 {
303 self.parse_poly(attr, false);
304 }
305 else
306 if(strcmp(el, "polygon") == 0)
307 {
308 self.parse_poly(attr, true);
309 }
310 //else
311 //if(strcmp(el, "<OTHER_ELEMENTS>") == 0)
312 //{
313 //}
314 // . . .
315 }
316
317
318 //------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 9

parse_attrMethod · 0.95
parse_pathMethod · 0.95
parse_rectMethod · 0.95
parse_lineMethod · 0.95
parse_polyMethod · 0.95
exceptionClass · 0.85
push_attrMethod · 0.80
begin_pathMethod · 0.80
end_pathMethod · 0.80

Tested by

no test coverage detected