MCPcopy Create free account
hub / github.com/Tencent/tgfx / parseRotateToken

Method parseRotateToken

src/svg/SVGAttributeParser.cpp:676–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674}
675
676bool 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
700bool SVGAttributeParser::parseSkewXToken(Matrix* matrix) {
701 return this->parseParenthesized(

Callers 1

parseMethod · 0.95

Calls 4

parseParenthesizedMethod · 0.95
parseScalarTokenMethod · 0.95
parseSepTokenMethod · 0.95
setRotateMethod · 0.80

Tested by

no test coverage detected