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

Method parseMatrixToken

src/svg/SVGAttributeParser.cpp:618–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

616}
617
618bool SVGAttributeParser::parseMatrixToken(Matrix* matrix) {
619 return this->parseParenthesized(
620 "matrix",
621 [this](Matrix* m) -> bool {
622 float scalars[6];
623 for (int i = 0; i < 6; ++i) {
624 if (!this->parseScalarToken(scalars + i) || (i <= 4 && !this->parseSepToken())) {
625 return false;
626 }
627 }
628
629 m->setAll(scalars[0], scalars[2], scalars[4], scalars[1], scalars[3], scalars[5]);
630 return true;
631 },
632 matrix);
633}
634
635bool SVGAttributeParser::parseTranslateToken(Matrix* matrix) {
636 return this->parseParenthesized(

Callers 1

parseMethod · 0.95

Calls 4

parseParenthesizedMethod · 0.95
parseScalarTokenMethod · 0.95
parseSepTokenMethod · 0.95
setAllMethod · 0.80

Tested by

no test coverage detected