// this is the shadow rectangle
tmp.Rectangle(50, 50, 100, 100, BGRA(183,183,183,255), BGRA(183,183,183,255),dmSet);
// this apply blur to the shadow
BGRAReplace(tmp, tmp.FilterBlurRadial(Rect(0,0,Width,Height),5,rbFast));
Bitmap.PutImage(0,0,tmp,dmSet);
// this draw the white rectangle
Bitmap.Rectangle(50, 50, 100, 100, BGRA(183,183,183,255), BGRAWhite,dmSet);
Exactly. Blur is slow. I prefer to use bitmaps.
See attached, all bitmaps I done with a professional image editing tool.
Toolbar with shadow.
Button with shadow.
Panel 1 big shadow. Panel 2 small shadow.
Rounded button with shadow.
Then I can use all of them in BGRABitmap using 'BGRASliceScaling'.
Edit: I've added 'Shadow' test project in BGRA-Controls SVN and seems that is a better option that using bitmaps. Check it out.