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

Method parseScaleToken

src/svg/SVGAttributeParser.cpp:656–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654}
655
656bool SVGAttributeParser::parseScaleToken(Matrix* matrix) {
657 return this->parseParenthesized(
658 "scale",
659 [this](Matrix* m) -> bool {
660 float sx = 0.0;
661 float sy = 0.0;
662 if (!this->parseScalarToken(&sx)) {
663 return false;
664 }
665
666 if (!(this->parseSepToken() && this->parseScalarToken(&sy))) {
667 sy = sx;
668 }
669
670 m->setScale(sx, sy);
671 return true;
672 },
673 matrix);
674}
675
676bool SVGAttributeParser::parseRotateToken(Matrix* matrix) {
677 return this->parseParenthesized(

Callers 1

parseMethod · 0.95

Calls 4

parseParenthesizedMethod · 0.95
parseScalarTokenMethod · 0.95
parseSepTokenMethod · 0.95
setScaleMethod · 0.80

Tested by

no test coverage detected