Mask from RoundRectShape?

hello, is there a easy and fast way to get a mask from RoundRectShape?
my purpose is to fill this with a color gradient and the edges stay transparent.

i would like to make cards with different styles & heights and paint in real time if they scroll.

‘do it the old way’ ?

[code]Dim myCard as new picture (200,100,32)
mycard.mask = new picture (200,100,32) = &cffffff 0,0, mycard.width, mycard.height
//construct your round rectshape

//Now draw on[/code]

thanks, i think it is the only way via images.