GeneralPath buildPath = new GeneralPath(
fillRule.equals("evenodd") ? GeneralPath.WIND_EVEN_ODD : GeneralPath.WIND_NON_ZERO,
commands.length);
BuildHistory hist = new BuildHistory();
for (int i = 0; i < commands.length; i++)
{
PathCommand cmd = commands[i];
cmd.appendPath(buildPath, hist);