Draft document-rendering tiling API to be called from viewer apps

Tor Lillqvist tml at iki.fi
Wed Jun 6 10:36:28 PDT 2012


>> Sure, but on the other hand it makes it simpler in that we don't need
>> to figure out the aspect ratio of each page (they can be different)
>> beforehand.
>
>        Surely we have to do that in order to present it to the user ?

Yes, but no. There is something of a chicken-and-egg problem here. In
order to call even the getRendererCount() of XRenderable (which gives
the number of pages), you have to pass it set of properties that
include "RenderDevice" whose value is an XDevice for a virtual device
created with XToolkit's createScreenCompatibleDevice(), which takes
bitmap size parameters;) The same property set is passed also to
render().

I.e., in order to know what size (well, aspect ratio) a particular
page is, you need to render it, and to render it, you need a device,
and a bitmap-backed virtual device is created with a specific size.

But I might be missing something...

BTW, noticed a hilarious thing today: The documentation for XDevice
says "If the specified area does not lie entirely in the device, the
bits outside are not specified". Oh good. But does it "specify", or
even hint, what the bits *inside* are then? Nope.

--tml


More information about the LibreOffice mailing list