Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.