added prototype func to transforms_CAPI; cleaned up paintGrid globals