koreader/koreader-base — pull request #255 by hwhw (2014-11-02 20:22:59+00:00)
Title: add method to create a viewport: rectangular subset

New method "viewport()" allows to define a rectangular part of a
blitbuffer and create a new blitbuffer object, offering access
to the memory for our blitbuffer, but starting coordinates within
that rectangular area from (0,0).

Note that the new viewport blitbuffer does not allocate new memory.
The callee must ensure that the memory stays in place.