In a large heavy skillet heat the butter and olive oil over low heat. Saute the onions slowly, stirring occasionally, for about 30 minutes. They should be very soft, slightly golden, but not brown.
Preheat the oven to 350 degrees. Lightly oil a 10inch round baking dish or pie plate. Arrange a circular layer of overlapping potatoes in the pan and sprinkle with salt and pepper. Arrange a thin layer of onions on top and sprinkle with some of the rosemary. Continue layering until you have used up all the ingredients, finishing with the rosemary. Pour the cream mixture into the dish around the edges so that you don=t disturb the rosemary, drizzling just a little over the top. Cover the pan with aluminum foil and bake for 40 minutes. Remove the foil and cook for 10 minutes more, until the top is golden and the potatoes are tender. Let cool for 5 minutes then slice into loose wedges and serve.