Add radiusRect function for dialog.