use of com.github.jorgecastillo.svg.SvgPathParser in project AndroidFillableLoaders by JorgeCastilloPrz.
the class FillableLoader method buildPathData.
private void buildPathData() {
SvgPathParser parser = getPathParser();
pathData = new PathData();
try {
pathData.path = parser.parsePath(svgPath);
} catch (ParseException e) {
pathData.path = new Path();
}
PathMeasure pm = new PathMeasure(pathData.path, true);
while (true) {
pathData.length = Math.max(pathData.length, pm.getLength());
if (!pm.nextContour()) {
break;
}
}
}
Aggregations