Previously when ever i moved the scrollbars i used to get
previous picture mixed with the new viewing area. So i thought that scene is not updating
properly and reimplemented the scrollByContents method.

This solved the problem but iam still not getting the proper picture at the ends.