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


Hi All,

Status for the last week

* Started Working on Calc Tiled Rendering

** Getting some output to be shown was deceptively simple.
** Even images seem to be shown, however only as an outline
    (i.e. not showing the content) -- the same thing seems to
    be happening in Calc (where you need to touch/move/otherwise
    manipulate the document before the image itself is shown, so
    AFAICS not a tiled rendering specific bug).


** However scaling / matching document coordinates is tricky
    (and is what I've spent most of the week working on).

***: For document "size" we currently grab the area containing
       cells with data, which is then the suggested minimum area that
       should be rendered.
**** Client can request that additional are (with empty cells) be rendered,
       allowing for an infinitely expanding document as in calc.
**** However this area (or the way we currently determine it) doesn't
       take into account images (and presumably other objects) that aren't
within a cell, and also cells that are merely formatted but don't have data.
       (I.e. will still need some improvement to be truly useful).

***: Scaling is also wrong, it turns out we have a bunch of rounding errors being propagated due to repeated scaling, which means that when you request a tile nominally covering the whole document you would get something like
       in calc_scalewrong.png (attached).
       (Ignore the image being cut for now, see above)
****: For some reason calc does most of its drawing in pixel mapped mode, rather than in document dimensions, i.e. it handles all the scaling itself, rather than using the virtual device scaling. This results in multiple multiplications with some fairly
        small fractions, with errors creeping in that way.
****: Managed to fix this (for the cell outlines only for now, cell contents/images still to be done), by rewriting the painting to only use the virtual devices built in scaling (whereas currently the scaling is passed into the ViewData, which multiplies the desired scale by the screen PPT[XY], which is where most of the error occurs). See calc_tiled.png for this (I've changed zoom-levels just to make scaling issues more apparent, this can be tweaked easily in the gtktiledviewer sources). ****: However using this means that Calc (non-tiled rendering mode) will also be affected,
        see calc_broken.png.
****: Still thinking about the best way to proceed, some options would be:
1) Have tiled-rendering conditions throughout the code to use the correct scaling
            only then (probably a huge nightmare to maintain).
2) Rewrite all of the frontend code to get rid of the internal scaling, instead relying on the virtualdevice scaling (better for maintenance, but potential for bugs in the short term). This probably shouldn't be too tricky, but will touch quite a bit of code. 3) Combination of the above: work on the tiled rendering only for now, rewrite the frontend later to use the tiled output + use the tiled dimensions for the rest of the UI (i.e. the column/
            row bars), and finally scrap the old code.
****: We could potentially just ignore these scaling issues, but for tiled rendering I suspect it's crucial that coordinates stay in the same place since we might be grabbing the same content rendered at multiple zoom levels etc., and the document potentially moving around at different
         scaling levels would look quite glitchy I suspect.

* Some more LOK work:
** glib inspired class/object splitting.
** Since we're now breaking ABI anyway, got rid of the annoying
    double initialisation.

Cheers,

    Andrzej

Attachment: calc_broken.png
Description: PNG image

Attachment: calc_tiled.png
Description: PNG image

Attachment: calc_scalewrong.png
Description: PNG image


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.