MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / nsvg__parseSymbol

Function nsvg__parseSymbol

rEFIt_UEFI/libeg/nanosvg.cpp:3411–3430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3409}
3410
3411static void nsvg__parseSymbol(NSVGparser* p, const char** dict)
3412{
3413 NSVGsymbol* symbol;
3414 NSVGattrib* curAttr = nsvg__getAttr(p);
3415 int i;
3416 symbol = (NSVGsymbol*)AllocateZeroPool(sizeof(NSVGsymbol));
3417 for (i = 0; dict[i]; i += 2) {
3418 if (strcmp(dict[i], "viewBox") == 0) {
3419 char* Next = 0;
3420 AsciiStrToFloat(dict[i + 1], &Next, &symbol->viewBox[0]);
3421 AsciiStrToFloat((const char*)Next, &Next, &symbol->viewBox[1]);
3422 AsciiStrToFloat((const char*)Next, &Next, &symbol->viewBox[2]);
3423 AsciiStrToFloat((const char*)Next, &Next, &symbol->viewBox[3]);
3424 } else nsvg__parseAttr(p, dict[i], dict[i + 1]);
3425 }
3426 AsciiStrCpyS(symbol->id, 64, curAttr->id);
3427// memcpy(symbol->xform, curAttr->xform, 6*sizeof(float));
3428 symbol->next = p->symbols;
3429 p->symbols = symbol;
3430}
3431
3432static void nsvg__parseGroup(NSVGparser* p, const char** dict)
3433{

Callers 1

nsvg__startElementFunction · 0.85

Calls 6

nsvg__getAttrFunction · 0.85
AsciiStrToFloatFunction · 0.85
nsvg__parseAttrFunction · 0.85
AsciiStrCpySFunction · 0.85
AllocateZeroPoolFunction · 0.50
strcmpFunction · 0.50

Tested by

no test coverage detected