improve Basic and Rectangle samples

1. change Basic scaleComponents local from bool to int to fix stack
trash in 64-bit builds.
2. initialize variables used in alternate code paths.
Merge pull request #8 from Dithermaster/master

improve Basic and Rectangle samples