Scale the origin for the Draw Layer (Calc Tiled Rendering).

Since we're changing units, we also need to scale the origin
by the correct amount.

Change-Id: Ie0563376e8fa56f20c30da4fe3cc50546f18e84f
Use logic units for visible-cells determination.

This eliminates a bunch of LogicToPixel conversions, and also
means that tiles starting other than the origin are correctly
processed (as LogicToPixel run on a rectangle will also move that
rectangle depending on the origin set in the output device).

Change-Id: I42903fe23ad5f6baa1d5276d5dcc7ee038bd27cf
Iterate from origin to tile area to ensure correct positioning.

Change-Id: I29e881f9e67b84e208a198d2aad06db382d14698
Rectangle width doesn't map to B2IBox.

Previously the clip region would end up being 1 pixel smaller in both
directions than the requested area -- B2IBox considers the bottom-right
point to NOT be included in its area, whereas Rectangle considers the
bottom-right point to be the last point WITHIN its area.

(This is equivalent to the Rectangle's getWidth/GetWidth differentiation.)

This is noticeable e.g. with tiled rendering, where images spanning
a tile boundary are clipped to paint only the region within a given
tile -- however previously they would be clipped by an additional pixel
in each direciton, resulting in an empty border along the bottom-right
edge.

Change-Id: I0ef3098959defc5c82719155c130aa904c04b6b1
Implement a (qa-only) quad-tiled viewer.

I.e. we subdivide the document into 4 tiles: one at 100% scaling,
one at 200%, one at 50%, one at 25% -- these are then post-scaled
in gdk) and assembled to show as one document again.

This is specifically a test only widget, primarily to be able to quickly
spot any tile positioning/border-transition issues.

We could theoretically make this widget inherit from the original widget,
however that would mean having to introduce virtual methods etc., which
is not something that we'd want in production -- in the longer run
that widget will hopefully be extended to have proper tile composition etc.,
which would then break this widget too if it were inheriting from there.

Change-Id: Ib880a1614f89724135e753013cf91aec25973e39
LOK DocView: only rerender on zoom if we have a document open.

Otherwise we would segfault, and it's perfectly valid to set a zoom
level _before_ opening a document (as that would e.g. save the document
first being rendered on opening if the client wants to immediately
render at a non-standard zoom level).

Change-Id: Ide261b09f4aab8dc3b552f6c3bf55f78ffd7870c
Quad Docview: only rerender on zoom if we have a document open.

Same as
"LOK DocView: only rerender on zoom if we have a document open."
but for our quad-tiled test widget.

Change-Id: I6c1b946cc9d576d1dcc4687048339d9f0b3e6eff
gtktiledviewer: allow selecting between normal and quad-tile view.

Change-Id: I85b22b93fe4ce2ffb62df8766ceea7a1bd8961ee