-------------------------------------------------------------
| 381 | |
| 382 | //------------------------------------------------------------- |
| 383 | void parser::parse_path(const char** attr) |
| 384 | { |
| 385 | int i; |
| 386 | |
| 387 | for(i = 0; attr[i]; i += 2) |
| 388 | { |
| 389 | // The <path> tag can consist of the path itself ("d=") |
| 390 | // as well as of other parameters like "style=", "transform=", etc. |
| 391 | // In the last case we simply rely on the function of parsing |
| 392 | // attributes (see 'else' branch). |
| 393 | if(strcmp(attr[i], "d") == 0) |
| 394 | { |
| 395 | m_tokenizer.set_path_str(attr[i + 1]); |
| 396 | m_path.parse_path(m_tokenizer); |
| 397 | } |
| 398 | else |
| 399 | { |
| 400 | // Create a temporary single pair "name-value" in order |
| 401 | // to avoid multiple calls for the same attribute. |
| 402 | const char* tmp[4]; |
| 403 | tmp[0] = attr[i]; |
| 404 | tmp[1] = attr[i + 1]; |
| 405 | tmp[2] = 0; |
| 406 | tmp[3] = 0; |
| 407 | parse_attr(tmp); |
| 408 | } |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | |
| 413 | //------------------------------------------------------------- |
no test coverage detected