private void initShape() {
        // TODO: these could be optimised
        float cx = dim * 0.5f;
        float cy = dim * 0.5f + 1;
        float r  = (dim - 3) * 0.5f;
        float rh = r * 0.4f;
        for (int i = 0; i < 10; i++) {
            double ang = Math.PI/180 * (i * 36 - 90);
            float ri   = i % 2 == 0 ? r : rh;
            float x    = (float) Math.cos(ang) * ri + cx;
            float y    = (float) Math.sin(ang) * ri + cy;
            if (i == 0) {
                gp.moveTo(x, y);
            } else {
                gp.lineTo(x, y);
            }
        }
        gp.closePath();
    }
private void initShape() {
       
        float cx = dim * 0.5f;
        float cy = dim * 0.5f + 1;
        float r  = (dim - 3) * 0.5f;
        float rh = r * 0.4f;
        for (int i = 0; i < 10; i++) {
            double ang = Math.PI/180 * (i * 36 - 90);
            float ri   = i % 2 == 0 ? r : rh;
            float x    = (float) Math.cos(ang) * ri + cx;
            float y    = (float) Math.sin(ang) * ri + cy;
            if (i == 0) {
                gp.moveTo(x, y);
            } else {
                gp.lineTo(x, y);
            }
        }
        gp.closePath();
    }
private void initshape() { float cx = dim * 0.5f; float cy = dim * 0.5f + 1; float r = (dim - 3) * 0.5f; float rh = r * 0.4f; for (int i = 0; i < 10; i++) { double ang = math.pi/180 * (i * 36 - 90); float ri = i % 2 == 0 ? r : rh; float x = (float) math.cos(ang) * ri + cx; float y = (float) math.sin(ang) * ri + cy; if (i == 0) { gp.moveto(x, y); } else { gp.lineto(x, y); } } gp.closepath(); }