int size = itemList.size();
int i = 0;
int[] j = parameterIndex;
j[0] = 0;
while (i < size && i < commands.length) {
SVGPathSeg s = (SVGPathSeg) itemList.get(i);
if (s.getPathSegType() != commands[i]) {
s = newItem(commands[i], parameters, j);
} else {
switch (commands[i]) {
case SVGPathSeg.PATHSEG_ARC_ABS:
case SVGPathSeg.PATHSEG_ARC_REL: {