Making badge from RoundedRectangle

Thanks for your help I got it working and it stretches perfectly.

Here is the code if anyone might want to use it or for examples.

    go.Shape.defineFigureGenerator('Badge', function(shape, w, h) {
        var radius = h / 2,
            geo = new go.Geometry();

        // a single figure consisting of straight lines and half-circle arcs
        geo.add(new go.PathFigure(0, radius)
            .add(new go.PathSegment(go.PathSegment.Arc, 90, 180, radius, radius, radius, radius))
            .add(new go.PathSegment(go.PathSegment.Line, w - radius, 0))
            .add(new go.PathSegment(go.PathSegment.Arc, 270, 180, w - radius, radius, radius, radius))
            .add(new go.PathSegment(go.PathSegment.Line, radius, h).close()));

        // don't intersect with two top corners when used in an "Auto" Panel
        geo.spot1 = new go.Spot(0, 0, 0.1 * radius, 0.1 * radius);
        geo.spot2 = new go.Spot(1, 1, -0.1 * radius, 0);

        return geo;
    });