| 674 | } |
| 675 | |
| 676 | bool SVGAttributeParser::parseRotateToken(Matrix* matrix) { |
| 677 | return this->parseParenthesized( |
| 678 | "rotate", |
| 679 | [this](Matrix* m) -> bool { |
| 680 | float angle; |
| 681 | if (!this->parseScalarToken(&angle)) { |
| 682 | return false; |
| 683 | } |
| 684 | |
| 685 | float cx = 0; |
| 686 | float cy = 0; |
| 687 | // optional [<cx> <cy>] |
| 688 | if (this->parseSepToken() && this->parseScalarToken(&cx)) { |
| 689 | if (!(this->parseSepToken() && this->parseScalarToken(&cy))) { |
| 690 | return false; |
| 691 | } |
| 692 | } |
| 693 | |
| 694 | m->setRotate(angle, cx, cy); |
| 695 | return true; |
| 696 | }, |
| 697 | matrix); |
| 698 | } |
| 699 | |
| 700 | bool SVGAttributeParser::parseSkewXToken(Matrix* matrix) { |
| 701 | return this->parseParenthesized( |
no test coverage detected