Fixed unexpected warning
Added some constants
Make the rect param not mandatory
Now use an offscreen to simplify scan lines