sws.fillstyles = new ArrayList<FillStyle>();
int fsIndex = sws.fillstyles.add(fs) ? sws.fillstyles.lastIndexOf(fs) + 1 : 0;
sws.linestyles = new ArrayList<LineStyle>();
// Build Raw SWF Shape
ShapeBuilder builder = new ShapeBuilder(new Point());
builder.setUseFillStyle0(true);
builder.setCurrentFillStyle0(fsIndex);
builder.move(0, 0);
builder.straight(width, 0);
builder.straight(width, height);
builder.straight(0, height);
builder.straight(0, 0);
builder.correctRoundingErrors();
sws.shapeRecords = builder.build().shapeRecords;
// Wrap up into a SWF DefineShape Tag
DefineShape defineShape = new DefineShape(Tag.stagDefineShape3);
defineShape.bounds = new Rect(width * SwfConstants.TWIPS_PER_PIXEL, height * SwfConstants.TWIPS_PER_PIXEL);
defineShape.shapeWithStyle = sws;