Adjacent Files

Project Info

. > library > src > main > java > james > adaptiveicon > utils > PathUtils.java

createPathFromPathData

Type: public static Path

Parameter Name Description
pathData The string representing a path, the same as “d” string in svg file.

Returned Value: the generated Path object.

PathDataNode

Type: public static

Parameter Name Description
pathData The string representing a path, the same as “d” string in svg file.

Returned Value: an array of the PathDataNode.

float

Type: private static

Parse the floats in the string. This is an optimized version of parseFloat(s.split(“,|\s”));

Parameter Name Description
s the string containing a command and list of floats

Returned Value: array of floats

extract

Type: private static int

Calculate the position of the next comma or space

Parameter Name Description
s the string to search
start the position to start searching

Returned Value: the position of the next comma or space or -1 if none found

arcToBezier

Type: private static void

Converts an arc to cubic Bezier segments and records them in p.

Parameter Name Description
p The target for the cubic Bezier segments
cx The x coordinate center of the ellipse
cy The y coordinate center of the ellipse
a The radius of the ellipse in the horizontal direction
b The radius of the ellipse in the vertical direction
e1x E(eta1) x coordinate of the starting point of the arc
e1y E(eta2) y coordinate of the starting point of the arc
theta The angle that the ellipse bounding rectangle makes with horizontal plane
start The start angle of the arc on the ellipse
sweep The angle (positive or negative) of the sweep of the arc on the ellipse
This site may do shady things with cookies and stuff because it's evil. Please don't read my privacy policy. close