int dya = stt;
int dyb = sbt - stt;
int dyc = (int)(bitmap.height * SwfConstants.TWIPS_PER_PIXEL) - sbt;
// border
shapeRecords.add(new StyleChangeRecord(0, dya, 0, 0, 1));
shapeRecords.add(new StraightEdgeRecord(0, -dya));
shapeRecords.add(new StraightEdgeRecord(dxa, 0));
shapeRecords.add(new StyleChangeRecord(0, 0, 2));
shapeRecords.add(new StraightEdgeRecord(dxb, 0));
shapeRecords.add(new StyleChangeRecord(0, 0, 3));
shapeRecords.add(new StraightEdgeRecord(dxc, 0));
shapeRecords.add(new StraightEdgeRecord(0, dya));
shapeRecords.add(new StyleChangeRecord(0, 0, 6));
shapeRecords.add(new StraightEdgeRecord(0, dyb));
shapeRecords.add(new StyleChangeRecord(0, 0 ,9));
shapeRecords.add(new StraightEdgeRecord(0, dyc));
shapeRecords.add(new StraightEdgeRecord(-dxc, 0));
shapeRecords.add(new StyleChangeRecord(0, 0, 8));
shapeRecords.add(new StraightEdgeRecord(-dxb, 0));
shapeRecords.add(new StyleChangeRecord(0, 0, 7));
shapeRecords.add(new StraightEdgeRecord(-dxa, 0));
shapeRecords.add(new StraightEdgeRecord(0, -dyc));
shapeRecords.add(new StyleChangeRecord(0, 0, 4));
shapeRecords.add(new StraightEdgeRecord(0, -dyb));
// down 1
shapeRecords.add(new StyleChangeRecord(dxa, 0, 0, 2, 1));
shapeRecords.add(new StraightEdgeRecord(0, dya));
shapeRecords.add(new StyleChangeRecord(0, 5, 4));
shapeRecords.add(new StraightEdgeRecord(0, dyb));
shapeRecords.add(new StyleChangeRecord(0, 8, 7));
shapeRecords.add(new StraightEdgeRecord(0, dyc));
// down 2
shapeRecords.add(new StyleChangeRecord(dxa + dxb, 0, 0, 3, 2));
shapeRecords.add(new StraightEdgeRecord(0, dya));
shapeRecords.add(new StyleChangeRecord(0, 6, 5));
shapeRecords.add(new StraightEdgeRecord(0, dyb));
shapeRecords.add(new StyleChangeRecord(0, 9, 8));
shapeRecords.add(new StraightEdgeRecord(0, dyc));
// right 1
shapeRecords.add(new StyleChangeRecord(0, dya, 0, 1, 4));
shapeRecords.add(new StraightEdgeRecord(dxa, 0));
shapeRecords.add(new StyleChangeRecord(0, 2, 5));
shapeRecords.add(new StraightEdgeRecord(dxb, 0));
shapeRecords.add(new StyleChangeRecord(0, 3, 6));
shapeRecords.add(new StraightEdgeRecord(dxc, 0));
// right 2
shapeRecords.add(new StyleChangeRecord(0, dya + dyb, 0, 4, 7));
shapeRecords.add(new StraightEdgeRecord(dxa, 0));
shapeRecords.add(new StyleChangeRecord(0, 5, 8));
shapeRecords.add(new StraightEdgeRecord(dxb, 0));
shapeRecords.add(new StyleChangeRecord(0, 6, 9));
shapeRecords.add(new StraightEdgeRecord(dxc, 0));
DefineShape shape = new DefineShape(TagValues.stagDefineShape4);
shape.bounds = TypeHelper.rect(width, height);
shape.edgeBounds = shape.bounds;