Support for SVG fill-rule

This commit is contained in:
Chlumsky 2023-11-08 12:01:43 +01:00
parent 0eaeb51ea3
commit f04dc6acd3
1 changed files with 3 additions and 0 deletions

View File

@ -519,6 +519,9 @@ static void gatherPaths(SkPath &fullPath, int &flags, tinyxml2::XMLElement *pare
curPath.close();
} else
continue;
const char *fillRule = cur->Attribute("fill-rule");
if (fillRule && !strcmp(fillRule, "evenodd"))
curPath.setFillType(SkPathFillType::kEvenOdd);
curPath.transform(combineTransformation(flags, transformation, cur->Attribute("transform"), cur->Attribute("transform-origin")));
if (Op(fullPath, curPath, kUnion_SkPathOp, &fullPath))
flags |= SVG_IMPORT_SUCCESS_FLAG;