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

Method parseNamedColorToken

src/svg/SVGAttributeParser.cpp:255–268  ·  view source on GitHub ↗

https://www.w3.org/TR/SVG11/types.html#DataTypeColor

Source from the content-addressed store, hash-verified

253
254// https://www.w3.org/TR/SVG11/types.html#DataTypeColor
255bool SVGAttributeParser::parseNamedColorToken(Color* c) {
256 RestoreCurPos restoreCurPos(this);
257
258 std::string ident;
259 if (!this->parseIdentToken(&ident)) {
260 return false;
261 }
262 if (!SVGParse::FindNamedColor(ident.c_str(), c)) {
263 return false;
264 }
265
266 restoreCurPos.clear();
267 return true;
268}
269
270bool SVGAttributeParser::parseHexColorToken(Color* c) {
271 RestoreCurPos restoreCurPos(this);

Callers 1

parseColorTokenMethod · 0.95

Calls 3

parseIdentTokenMethod · 0.95
c_strMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected