Merge pull request #221 from chrox/master

refactor out Docview:render calling into a seperate function
use docToWindowPoint to transform document rect to screen rect