for (int i = 0; i < shapeRecords.size(); i++)
{
ShapeRecord record = shapeRecords.get(i);
if (record instanceof StyleChangeRecord)
{
StyleChangeRecord old_scr = (StyleChangeRecord) record;
StyleChangeRecord new_scr = new StyleChangeRecord();
if (fillStyle0Index > 0)
new_scr.setFillStyle0(fillStyle0Index);
if (fillStyle1Index > 0)
new_scr.setFillStyle1(fillStyle1Index);
if ((!old_scr.stateLineStyle) && (lineStyleIndex > 0))
new_scr.setLinestyle(lineStyleIndex);
else
new_scr.setLinestyle(old_scr.linestyle);
if (old_scr.stateMoveTo)
new_scr.setMove(old_scr.moveDeltaX, old_scr.moveDeltaY);
shapeRecords.set(i, new_scr);
}
}