Custom shape clipping

I’d like to do what is described here:
http://www.defold.com/manuals/clipping/

but with a custom shape instead of a pie. All I need is to round the corners of a rectangular picture. Is there something simpler than what described here:

I have even tried to use 4 small pie nodes (at the 4 corners) with inverted clipping, but it didn’t work at first attempt and I’d like to hear suggestions before taking this road.

It depends on your use case. Would it work with to use a rectangular clipper and then just cover the corner with rounded pieces?

Yes, but I don’t know how to accomplish this. Right now I have a huge sprite that acts as full screen background, and a gui with a rectangular picture, to which I would like to round the corners. I use a sprite as a background because I need other sprites to move on top of it. (gui nodes, if I understand well, are always on top of sprites)
The best option would be if I could simply apply a custom alpha mask to the gui node.
Your suggestion is the same I was trying to achieve, but with no success. Could you elaborate on this?

I may have found a solution. You can use a model component with any shape mesh that you like and give it a material with the “gui” tag so it renders in screen space like a normal gui component. I didn’t mess around with enlarging the texture and moving it around, but that should be pretty easy to do by messing with the UVs in the fragment shader. You would lose the special perks of gui components (automatic alignment, etc.), but if all else fails I think it would work.