| 633 | } |
| 634 | |
| 635 | bool SVGAttributeParser::parseTranslateToken(Matrix* matrix) { |
| 636 | return this->parseParenthesized( |
| 637 | "translate", |
| 638 | [this](Matrix* m) -> bool { |
| 639 | float tx = 0.0; |
| 640 | float ty = 0.0; |
| 641 | this->parseWSToken(); |
| 642 | if (!this->parseScalarToken(&tx)) { |
| 643 | return false; |
| 644 | } |
| 645 | |
| 646 | if (!this->parseSepToken() || !this->parseScalarToken(&ty)) { |
| 647 | ty = 0.0; |
| 648 | } |
| 649 | |
| 650 | m->setTranslate(tx, ty); |
| 651 | return true; |
| 652 | }, |
| 653 | matrix); |
| 654 | } |
| 655 | |
| 656 | bool SVGAttributeParser::parseScaleToken(Matrix* matrix) { |
| 657 | return this->parseParenthesized( |
no test coverage detected