-------------------------------------------------------------
| 659 | |
| 660 | //------------------------------------------------------------- |
| 661 | void parser::parse_line(const char** attr) |
| 662 | { |
| 663 | int i; |
| 664 | double x1 = 0.0; |
| 665 | double y1 = 0.0; |
| 666 | double x2 = 0.0; |
| 667 | double y2 = 0.0; |
| 668 | |
| 669 | m_path.begin_path(); |
| 670 | for(i = 0; attr[i]; i += 2) |
| 671 | { |
| 672 | if(!parse_attr(attr[i], attr[i + 1])) |
| 673 | { |
| 674 | if(strcmp(attr[i], "x1") == 0) x1 = parse_double(attr[i + 1]); |
| 675 | if(strcmp(attr[i], "y1") == 0) y1 = parse_double(attr[i + 1]); |
| 676 | if(strcmp(attr[i], "x2") == 0) x2 = parse_double(attr[i + 1]); |
| 677 | if(strcmp(attr[i], "y2") == 0) y2 = parse_double(attr[i + 1]); |
| 678 | } |
| 679 | } |
| 680 | |
| 681 | m_path.move_to(x1, y1); |
| 682 | m_path.line_to(x2, y2); |
| 683 | m_path.end_path(); |
| 684 | } |
| 685 | |
| 686 | |
| 687 | //------------------------------------------------------------- |
no test coverage detected